12885Re: "ocaml_beginners":: Monitor memory usgae from executing ocaml code
- Aug 2, 2011
> It always requests more memory from the operating system than you needWhich is also how malloc works.
> at the moment. It tries to allocate huge sequential chunks at once, so
> it doesn't need to call malloc/mmap again and again for every small
IIRC from the runtime code, the main idea is to have all major heap
values grouped together so that it's faster to tell if a value is in the major
heap (thus must be traversed by the GC) by looking at its address (while a mere
malloc would scatter objects here and there).
Biggarays content does not need to be traversed by the GC (since they can contain
only immediate values) and so are free to be malloced.
Please correct me if I'm wrong.
- << Previous post in topic Next post in topic >>