
22 Jan
2009
22 Jan
'09
5:33 p.m.
Hello Patrick, Friday, January 23, 2009, 1:22:21 AM, you wrote:
In C, if you try to "alloca" too much memory, then the stack gets overwritten and bad things happen. Does GHC exhibit the same behavior with allocaArray and the like? Is there a way to find out how much is safe to allocate?
alloca allocs memory in heap, so it should be safe if you are not going to allocate lots of megabytes. you can use usual binary division algorithm to find how much you can allocate -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com