Solved

Heap in Macintosh

Posted on 2003-11-26
4
481 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
ID: 9827759
developer.apple.com should be a great place to start.
0
 
LVL 5

Expert Comment

by:Insolence
ID: 9828228
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
ID: 9829814
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
ID: 10085471
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Send secure, cloud-based, encrypted alerts and maintain HIPAA compliant messaging. Integrates priority & secure messaging into one application. Ensures IT, emergency respondents and healthcare professionals that their critical messages are never mis…

911 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

19 Experts available now in Live!

Get 1:1 Help Now