SemysMemAlloc

01 Allocates memory and returns the pointer.
02

void *SemysMemAlloc(uint32 size);
void *SemysMemAllocD(uint32 size, char const *file, int line);
void *SemysMemAllocF(uint32 size);

03 Parameters:
  • size: The amount of bytes to allocate.
  • file: set by constant __FILE__ (see below).
  • line: set by constant __LINE__ (see below).
size is uint32 rather than size_t because it's not expected to allocate negative bytes nor memory greater than some megabytes.
04 Return Values:
The allocated memory or 0 if failed.
05 SemysMemAlloc() is the variant to use. The other two variants are listed only for completeness.
06 SemysMemAlloc() is a define that refers to the corresponding variant according to debug build or not. (D for Debug and F for Free). I want my memory... ;)
07 Reference: SemysMemory.h
Implementation: Semys Library
See Also: Memory Sub-System, SemysMemFree()

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.