Original date:2015-01-05 00:26:23 Edited by: bryanso Subject: Is There a Maximum malloc Limitation?

I have a Mac Pro that has 32GB RAM. I'm using the Mac OS version of Euphoria 4.0.4. I found it not possible to allocate 1GB of RAM:

include std/eumem.e 
integer g = 1000000000 
printf(1, "  1G = %d\n", g) 
atom mem = malloc(g) 
ram_space[mem][1] = 10 
printf(1, "No issue allocating %d mem: %d\n", {g, ram_space[mem][1]}) 

Got a memory error (was successful when I allocate 500M).

  1G = 1000000000 
eui(8014,0xa075b1d4) malloc: *** mach_vm_map(size=4000002048) failed (error code=3) 
*** error: can't allocate region 
*** set a breakpoint in malloc_error_break to debug 
/Users/bryanso/EUPHORIA4/include/std/eumem.e:47 in function malloc()  
Your program has run out of memory. 
One moment please...  

Seems to be a very restrictive limitation. I'm working on AI best-first-search app that has a huge search space therefore need to use as much memory as possible.

Is it possible to recompile Euphoria source in Mac OS to increase the limit?

Does Euphoria for Linux 64-bit have the same limit?


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu