Solved

Heap in Macintosh

Posted on 2003-11-26
4
517 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

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 …
A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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