The maximum size of the hash table

Bug #1877800 reported by linnilbobo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

I want to create a hash table that can store more records,
(I wonder if there is a way to store more data in a single hash table besides nested )
although I know that in actual use, I will not use such a large amount at all.
---
林: (setf *the-hash-table* (make-hash-table
                                 :size 100000000
                                 :test #'equal
                                 :rehash-size 2.0
                                 :rehash-threshold 0.8
                                 :synchronized t
                                 :weakness nil))
; in: SETF *THE-HASH-TABLE*
; (SETF *THE-HASH-TABLE*
; (MAKE-HASH-TABLE :SIZE 100000000 :TEST #'EQUAL :REHASH-SIZE 2.0
; :REHASH-THRESHOLD 0.8 :SYNCHRONIZED T :WEAKNESS ...))
; ==>
; (SETQ *THE-HASH-TABLE*
; (MAKE-HASH-TABLE :SIZE 100000000 :TEST #'EQUAL :REHASH-SIZE 2.0
; :REHASH-THRESHOLD 0.8 :SYNCHRONIZED T :WEAKNESS ...))
;
; caught WARNING:
; undefined variable: COMMON-LISP-USER::*THE-HASH-TABLE*
;
; compilation unit finished
; Undefined variable:
; *THE-HASH-TABLE*
; caught 1 WARNING condition

#<HASH-TABLE :TEST EQUAL :COUNT 0 {1001558033}>
林: (hash-table-size *the-hash-table*)

16777216
林: (expt 2 24)

16777216
林:
---
If I mentioned a repeated or resolved problem, please send a connection and point me to the correct page; if the problem cannot be solved temporarily, it’s no big deal.
Thanks for help

Tags: hash-table
Revision history for this message
Douglas Katzman (dougk) wrote :

The builtin hash-table can grow to contain a theoretical maximum of 2^31 entries.
At that size it would consume 56GiB of memory which is probably not the best storage choice.

Changed in sbcl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.