Documentation Project 1
ContentsIndexHome
PreviousUpNext
sack::memory Namespace

This is namespace sack::memory.

Name 
Description 
The following table lists functions in this documentation. 
The following table lists types in this documentation. 
The following table lists macros in this documentation. 
 
Name 
Description 
 
Allocates a block of memory of specific size. Debugging information if passed is recorded on the block. 
 
This is function sack::memory::CloseSpace. 
 
This is function sack::memory::CloseSpaceEx. 
 
This is function sack::memory::CStrDupEx. 
 
This is function sack::memory::CStrLen. 
 
This is function sack::memory::DebugDumpHeapMemEx. 
 
This is function sack::memory::DebugDumpHeapMemFile. 
 
This is function sack::memory::DebugDumpMemEx. 
 
This is function sack::memory::DebugDumpMemFile. 
 
not so much of a fragment as a consolidation. Finds a free spot earlier in the heap and attempts to move the block there. This can help alleviate heap fragmentation. 
 
This is function sack::memory::DisableHeapDebug. 
 
Converts from 8 bit char to 16 bit wchar (or no-op if not UNICODE compiled) 
 
 
This is function sack::memory::GetHeapMemStatsEx. 
 
MEM_PROC void MEM_API GetHeapMemStats ( PMEM pHeap, _32 *pFree, _32 *pUsed, _32 *pChunks, _32 *pFreeChunks ); 
 
This is function sack::memory::GetSpaceSize. 
 
This is function sack::memory::HeapAllocateEx. 
 
Moves a block of memory from one heap to another. 
 
This is function sack::memory::HeapPreallocateEx. 
 
This is function sack::memory::HeapReallocateEx. 
 
This is function sack::memory::HoldEx. 
 
even if pMem is just a POINTER returned from OpenSpace this will create a valid heap pointer.
will result TRUE if a valid heap is present will result FALSE if heap is not able to init (has content) 
 
This is function sack::memory::LockedDecrement. 
 
This is function sack::memory::LockedExchange. 
 
This is function sack::memory::LockedExchange64. 
 
Multi-processor safe exchange operation. Returns the prior value at the pointer. 
 
This is function sack::memory::LockedIncrement. 
 
Binary byte comparison of one block of memory to another. Results -1 if less, 1 if more and 0 if equal. 
 
memory copy operation. not safe when buffers overlap. Performs platform-native memory stream operation to copy from one place in memory to another. (32 or 64 bit operations as possible). 
 
This is function sack::memory::MemDupEx. 
 
This is function sack::memory::MemSet. 
 
 
 
Open a shared memory region. The region may be named with a text string (this does not work under linux platforms, and the name of the file to back the shared region is the sharing point). The region may be backed with a file (and must be if it is to be shared on linux.
If the region exists by name, the region is opened, and a pointer to that region is returned.
If the file exists, the file is opened, and mapped into memory, and a pointer to the file backed memory is returned.
if the file does... more 
 
This is function sack::memory::PreallocateEx. 
 
This is function sack::memory::ReallocateEx. 
 
Releases an allocated block. Memory becomes free to allocate again. If debugging information is passed, the releasing source and line is recorded in the block. (can be used to find code deallocating memory it shouldn't).
This also works with Hold(), and decrements the hold counter. If there are no more holds on the block, then the block is released. 
 
disables storing file/line, also disables auto GetMemStats checking 
 
This is function sack::memory::SetAllocateLogging. 
 
Sets whether to log critical sections or not.
returns the prior state of logging... 
 
This is function sack::memory::SetHeapUnit. 
 
disables auto GemMemStats on every allocate/release/Hold
GetMemStats will evaluate each and every block allocated in memory and inspect it for corruption. 
 
This is function sack::memory::SetMinAllocate. 
 
This is function sack::memory::SizeOfMemBlock. 
 
This is function sack::memory::StrCaseCmp. 
 
This is function sack::memory::StrCaseCmpEx. 
 
This is function sack::memory::StrCaseStr. 
 
This is function sack::memory::StrChr. 
 
This is function sack::memory::StrChr. 
 
This is function sack::memory::StrCmp. 
 
This is function sack::memory::StrCmp. 
 
This is function sack::memory::StrCmpEx. 
 
copy S2 to S1. This is 'unsafe', since neither paramter's size is known. Prefer StrCpyEx which passes the maximum length for S1. 
 
copy S2 to S1, with a maximum of N characters.
The last byte of S1 will always be a 'nul'. If S2 was longer than S1, then it will be truncated to fit within S1. Perferred method over this is SaveText or StrDup
 
This is function sack::memory::StrDupEx. 
 
This is function sack::memory::StrLen. 
 
This is function sack::memory::StrRChr. 
 
This is function sack::memory::StrRChr. 
 
This is function sack::memory::StrStr. 
 
This is function sack::memory::StrStr. 
Name 
Description 
This is macro sack::memory::_memcpy_. 
This is macro sack::memory::_memset_. 
Allocates a block of memory of specific size. Debugging information if passed is recorded on the block. 
This is function sack::memory::CStrDupEx. 
This is function sack::memory::DebugDumpHeapMemEx. 
Dumps all tracked heaps. 
A 'safe' release macro. casts the block to the type to release. Makes sure the pointer being released is the type specified. 
Converts from 8 bit char to 16 bit wchar (or no-op if not UNICODE compiled) 
This is function sack::memory::GetHeapMemStatsEx. 
This is function sack::memory::HeapAllocateEx. 
Moves a block of memory from one heap to another. 
This is function sack::memory::HeapPreallocateEx. 
This is function sack::memory::HeapReallocateEx. 
Hold 
This is function sack::memory::HoldEx. 
This is function sack::memory::MemDupEx. 
nothing.
does nothing, returns nothing. 
New 
A simple macro to allocate a new single unit of a structure. Adds a typecast automatically to be (type*) so C++ compilation is clean. Does not burden the user with extra typecasts. This, being in definition use means that all other things that are typecast are potentially error prone. Memory is considered uninitialized. 
Allocate a new array of type. 
Allocate sizeof(type). Will invoke some sort of registered initializer 
an advantage of C, can define extra space at end of structure which is allowed to carry extra data, which is unknown by other code room for exploits rock. 
Open a shared memory region. The region may be named with a text string (this does not work under linux platforms, and the name of the file to back the shared region is the sharing point). The region may be backed with a file (and must be if it is to be shared on linux.
If the region exists by name, the region is opened, and a pointer to that region is returned.
If the file exists, the file is opened, and mapped into memory, and a pointer to the file backed memory is returned.
if the file does... more 
This is function sack::memory::PreallocateEx. 
This is function sack::memory::ReallocateEx. 
Releases an allocated block. Memory becomes free to allocate again. If debugging information is passed, the releasing source and line is recorded in the block. (can be used to find code deallocating memory it shouldn't).
This also works with Hold(), and decrements the hold counter. If there are no more holds on the block, then the block is released. 
Reallocates an array of type. 
This is function sack::memory::StrDupEx. 
Name 
Description 
PMEM 
This is type sack::memory::PMEM. 
Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!