Solved

Heap in Macintosh

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Want To Rebuild My Win7 Boot Camp System From Scratch! 21 74
Migrating From One Mac To Another 2 74
Apple devices syncing internet history etc 1 69
Apple Certification 1 20
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 professional opinion on which Apple product to buy, and a tidbit about the WWDC.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
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…

809 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