Ryo, The SET MEMORY command makes a request for memory from the system; it does this in blocks of 100 Mwords. It does a malloc call and if that fails, reports an error. So the result depends on what the Ferret process is able to access at that moment. You are correct that the word size is in fact 8 bytes for double precision Ferret. I see that on "show memory", Ferret mis-reports the size as 4 bytes. yes? set mem/siz=292That should say (1 word = 8 bytes) Ansley On 8/5/2014 8:49 PM, Ryo Furue wrote:
Ferret users (on Mac in particular), It seems that memory that Ferret can use is limited to about 1 GiB (giga bytes) and I thought this can be a bug. yes? set memory/size=269 ferret_v6.82(33692) malloc: *** mmap(size=2152001536) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Unable to allocate 269.0 Mwords of memory. Restoring previous memory of 268.0 Mwords. I can't allocate 269 Mwords, which is about 1.00 GiB if one "word" is 4 bytes. Because of this problem, I can't read a variable which is a little over 1 GiB. Ferret says "request exceeds memory setting: 292 Mwords were requested." I thought 2 GiB is the actual maximum. The error message contains some hints that corroborate: 1) size=2152001536 is 2.00 GiB (if it's in bytes). 2) error code = 12 is "Cannot allocate memory" (from /usr/include/sys/errno.h). >From this, I guess that at some point in the Ferret code, one "word" is interpreted as 8 bytes. Ferret v6.82 for Mac. Best regards, Ryo ---- P.S. I use this convention: "M" == 10^6, "Mi" = 2^20, "G" == 10^9, "Gi" == 2^30. |