Solved

Heap in Macintosh

Posted on 2003-11-26
4
461 Views
Last Modified: 2013-11-17
Hi yours,

I am doing a simulation for studying purposes,
and need to know how Heaps are implemented in macintosh or if they even exist there,
i really don't got a clue.
With a Heap I mean the memory managing thing, the thing you get by GetProcessHeap() in windows
and not the mathematical datastructure of the same name.

I would like to hear some detailled explaination of the basic algorithms running
and the Heaps features.

Thanks in advance, drnick.

p.s. i run this question for linux and windows too in other threads
0
Comment
Question by:drnick
4 Comments
 
LVL 8

Expert Comment

by:pike480
Comment Utility
developer.apple.com should be a great place to start.
0
 
LVL 5

Expert Comment

by:Insolence
Comment Utility
pike sent ya in the right direction.  =)  If you want to save a lil' time, I found ya a few specific articles to look at, the first of which I used for research on a project.  =)  Enjoy

Memory Management - http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Concepts/AboutMemory.html
and
http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/Mach/chapter_6_section_5.html

API Memory Objects - http://developer.apple.com/qa/qa2001/qa1259.html

OS-X Virtual Memory Addressing - http://developer.apple.com/documentation/Performance/Conceptual/Performance/VirtualMemory/Virtual_Mem_on_Mac_OS_X.html

Differences between OS-X and BSD's implementation of the Darwin Kernel's Memory Structures - http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/BSD/chapter_11_section_3.html

 - Insolence
0
 
LVL 5

Author Comment

by:drnick
Comment Utility
Hi insolence,
you gave me a start, i found
http://developer.apple.com/documentation/mac/Memory/Memory-11.html
http://developer.apple.com/documentation/mac/Memory/Memory-59.html
which come close to my question but are not the answer yet.
let me elaborate:
i am trying to simulate the heaps behaviour on different os'es.
therefore, i need to know what is done below the surface.
the links we already have here tell me that i can allocate moveable or non-movable blocks, what datasturctures i can use and that the system tries to move moveable blocks around if i allocate non-moveable blocks.
that comes close, but doesn't hit.
the problem is:
- when i allocate a block, how does the os determine what location to use?
- if more than one location is possible, how does it determine which to use? first-fit? best-fit? something else?
- how are locations maintained by the os? has it free-memory lists? are there binary memory-maps?
- when the heap becomes too small, can it resize it by allocating new physical pages?
and such.

can anybody help me on that?

also, i maybe have to state that this is NOT a homework,
i'm a student, but this is a volountary (hope that's the correct pronounciation :-) project, for teaching purposes. the work itself, the creation of the simulation, will be done by myself, i'm just trying to speed up stuff.
thanks
0
 
LVL 1

Accepted Solution

by:
QuarkStrangenessCharm earned 500 total points
Comment Utility
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now