[Thread Prev][Thread Next][Index]

Re: [ferret_users] Mac memory limit problem?

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=292
 Cached data cleared from memory
yes? sh mem
 Current size of FERRET memory cache: 292 MegaWords  (1 word = 4 bytes)
That should say (1 word = 8 bytes)


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,

P.S.  I use this convention: "M" == 10^6, "Mi" = 2^20, "G" == 10^9,
"Gi" == 2^30.

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement