reactos/reactos/lib/rtl/heapdbg.c

24 lines
696 B
C
Raw Normal View History

[RTL/HEAP] - First commit of a heap manager rewrite. It introduces a totally new heap manager, with the following features: * Actually resembles real NT's heap manager; * Based on data structures similar to Windows 2003 and Vista+'s heap structures; * Supporting advanced heap flags (e.g. useful for debugging); * Substantially lower fragmentation rates (and thus speed and reliability) than the existing Wine's implementation. It's going to be further enhanced by adding a frontend allocator (for example, as lookaside lists, or as a Low Fragmentation Heap alike frontend in Vista+ systems); * Real support for user-defined flags and native support for user-defined values; * Native support for a custom commit routine, which is very important for trunk's win32 subsystem; * Reserving, committing, decommitting and freeing on the fly, unlike existing heap manager which prefers to reserve and commit as much as possible, and doesn't decommit when it's no longer necessary; * Support for per process heaps, with a proper lock; * Reserved support for a special so-called debug heap allocator (to be implemented in heapdbg.c) which will be useful for finding heap corruptions. The committed code is a result of a month of work, and is a heavy work-in-progress one. It already implements the bare minimum required to boot to 3rd stage and run FireFox 3, however many rare codepaths are not implemented yet and there is some maintenance work to do (e.g. move structures and defines to a standalone header file). A list of used references is stated in the header of a source file for now. svn path=/trunk/; revision=49007
2010-10-05 21:43:48 +00:00
/*
* PROJECT: ReactOS Runtime Library
* LICENSE: GPL - See COPYING in the top level directory
* FILE: lib/rtl/heapdbg.c
* PURPOSE: Heap manager debug heap
* PROGRAMMERS: Copyright 2010 Aleksey Bragin
*/
/* INCLUDES ******************************************************************/
#include <rtl.h>
#define NDEBUG
#include <debug.h>
BOOLEAN RtlpPageHeapEnabled = FALSE;
ULONG RtlpPageHeapGlobalFlags;
ULONG RtlpPageHeapSizeRangeStart, RtlpPageHeapSizeRangeEnd;
ULONG RtlpPageHeapDllRangeStart, RtlpPageHeapDllRangeEnd;
WCHAR RtlpPageHeapTargetDlls[512];
[RTL/HEAP] - First commit of a heap manager rewrite. It introduces a totally new heap manager, with the following features: * Actually resembles real NT's heap manager; * Based on data structures similar to Windows 2003 and Vista+'s heap structures; * Supporting advanced heap flags (e.g. useful for debugging); * Substantially lower fragmentation rates (and thus speed and reliability) than the existing Wine's implementation. It's going to be further enhanced by adding a frontend allocator (for example, as lookaside lists, or as a Low Fragmentation Heap alike frontend in Vista+ systems); * Real support for user-defined flags and native support for user-defined values; * Native support for a custom commit routine, which is very important for trunk's win32 subsystem; * Reserving, committing, decommitting and freeing on the fly, unlike existing heap manager which prefers to reserve and commit as much as possible, and doesn't decommit when it's no longer necessary; * Support for per process heaps, with a proper lock; * Reserved support for a special so-called debug heap allocator (to be implemented in heapdbg.c) which will be useful for finding heap corruptions. The committed code is a result of a month of work, and is a heavy work-in-progress one. It already implements the bare minimum required to boot to 3rd stage and run FireFox 3, however many rare codepaths are not implemented yet and there is some maintenance work to do (e.g. move structures and defines to a standalone header file). A list of used references is stated in the header of a source file for now. svn path=/trunk/; revision=49007
2010-10-05 21:43:48 +00:00
/* FUNCTIONS ******************************************************************/
/* EOF */