?
Solved

Heap in Macintosh

Posted on 2003-11-26
4
Medium Priority
?
546 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1500 total points
ID: 10085471
0

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
How to take pictures with depth using iOS 10
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

743 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