Some questions about the heap
Posted: Wed Oct 01, 2014 11:20 am
I finally started working on the heap! This, of course, brings many confusions:
1) I'm using liballoc as my memory manager. It requires some glue logic to allocate and deallocate "pages" of memory (4K in size). Now, this is probably due to my limited understanding of memory management, but it seems to be allocating 16 pages of memory for an integer. It also seems to not be properly freeing the pointers, seeing as in the screenshot the third integer's address is another 16 pages above the last two. Is this normal?
Screenshot for reference: 2) Where is a good place to start giving liballoc memory? Right now, I've hard-coded the start address of liballoc's heap to 0xC800000, but to be honest I have no idea what's there or how close it is to anything else.
Thanks in advance,
John
1) I'm using liballoc as my memory manager. It requires some glue logic to allocate and deallocate "pages" of memory (4K in size). Now, this is probably due to my limited understanding of memory management, but it seems to be allocating 16 pages of memory for an integer. It also seems to not be properly freeing the pointers, seeing as in the screenshot the third integer's address is another 16 pages above the last two. Is this normal?
Screenshot for reference: 2) Where is a good place to start giving liballoc memory? Right now, I've hard-coded the start address of liballoc's heap to 0xC800000, but to be honest I have no idea what's there or how close it is to anything else.
Thanks in advance,
John