Memory Allocator

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
Planetary_Myth
Posts: 28
Joined: Mon Aug 16, 2010 2:45 pm

Memory Allocator

Post by Planetary_Myth »

Figured it was worth taking a look at.

http://hoard.org/

milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Memory Allocator

Post by milon »

This could be good to play with in ROS, but we can't include it as part of ROS itself - it's not open source software. Have you tried it yet?

forart
Posts: 1050
Joined: Mon Nov 29, 2004 1:36 pm
Location: Italy
Contact:

Re: Memory Allocator

Post by forart »

There are *tons* of malloc alternatives:
Last but not least, here's a Thread @ Wikipedia
»Forward Agency NPO
In progress we (always) trust.

mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Memory Allocator

Post by mrugiero »

milon wrote:This could be good to play with in ROS, but we can't include it as part of ROS itself - it's not open source software. Have you tried it yet?
Erm, it is open source. I built it on Linux to try it a few days ago.
Hoard mainpage wrote:Hoard is distributed under the GPL (v2.0), and can also be licensed for commercial use.
forart wrote:There are *tons* of malloc alternatives:
Last but not least, here's a Thread @ Wikipedia
This has the advantage that it doesn't require rebuilding, which is useful when you run closed source programs (like most of the Windows's ones are).
Last edited by mrugiero on Mon Mar 12, 2012 2:18 pm, edited 1 time in total.

milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Memory Allocator

Post by milon »

mrugiero wrote:
milon wrote:it's not open source software.
Erm, it is open source.
*facepalm*
My bad, you're right. It is open source! Apparently my brain was in power-save mode last night...

PurpleGurl
Posts: 1788
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: Memory Allocator

Post by PurpleGurl »

forart wrote:There are *tons* of malloc alternatives:
Last but not least, here's a Thread @ Wikipedia
Nedmalloc looks like it is even better than Hoard.

BrentNewland
Posts: 176
Joined: Wed Oct 05, 2011 7:32 am

Re: Memory Allocator

Post by BrentNewland »

What's the difference between newcc (memory manager?) and a memory allocator?

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: Memory Allocator

Post by Z98 »

Corrected question: What's the difference between the common cache, memory manager, and memory allocator.

Answer:

Memory manager: Manages the mapping between physical and virtual memory and paging data in and out.

Common cache: Makes use of services offered by the memory manager to try and keep things in physical memory instead of having it paged out to disk. Low level service not directly exposed to user applications.

Memory allocator: I'm going to interpret this as the heap, since I don't recall anything off the top of my head that is called a "memory allocator." Basically is the user mode interface through which applications can ask for memory.

Planetary_Myth
Posts: 28
Joined: Mon Aug 16, 2010 2:45 pm

Re: Memory Allocator

Post by Planetary_Myth »

Other software from the hoard site.

http://plasma.cs.umass.edu/emery/software

Nedmalloc and Hoard are very close in performance.
Also Hoard has addons like the ones in the link above.
I use addons as a descriptor because they use Hoard's interface but not sure if all do or just certain ones in the link above do.

feldrim
Posts: 15
Joined: Wed Apr 25, 2007 4:07 pm

Re: Memory Allocator

Post by feldrim »

Although it is an old thread, I'd like to share a few thoughts about memory allocation, not directly a reply to the question of OP.
  • As we do not use malloc() but Win32 APIs such as HeapAlloc, HeapReAlloc,HeapFree, I believe ReactOS do not need a hardened malloc implementation like Linux does.
  • Therefore security about memory allocation issues must be handled inside the Win32 API.
  • The memory allocators mentioned above, are built on performance related design & optimizations, not security.
  • Windows 7 introduced Fault-Tolerant Heap (FTH) as a security measure about memory allocation bugs. It has a trade-off between performance and security and the bets are on security part.
  • I assume the design of memory allocation is based on how Server 2003 and/or XP handles. Thus, a memory allocator improving security would pose a proper way of handling the issue. As the DieHard by Emery Berger sets the base for FTH, adoption of the DieHard sounds more reasonable that Hoard, nedmalloc etc.
  • As the consequence of the trade-off, there might be significant performance decrease. Yet, it is possible to optimize later as the DieHard project still being actively maintained.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests