﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
33	additional members added to psMemBlock	robert.desonia@…	eugene	"Expanded the definition of psMemBlock (PsLib SDRS section 2.1.3 in 4/1/2004
version) to be:

/// typedef for memory identification numbers.  Guaranteed to be some variety of
integer.
typedef unsigned long psMemoryId;

/// typedef for a memory block's reference count. Guaranteed to be some variety
of integer.
typedef unsigned long psReferenceCount;

typedef struct psMemBlock
{
    const void* startblock;             ///< initialised to p_psMEMMAGIC
    struct psMemBlock* previousBlock;   ///< previous block in allocation list
    struct psMemBlock* nextBlock;       ///< next block allocation list
    size_t  userMemorySize;             ///< the size of the user-portion of the
memory block
    const psMemoryId id;                ///< a unique ID for this allocation
    const char* file;                   ///< set from __FILE__ in e.g. p_psAlloc
    const int lineno;                   ///< set from __LINE__ in e.g. p_psAlloc
    psReferenceCount refCounter;            ///< how many times pointer is
referenced
    const void* endblock;               ///< initialised to p_psMEMMAGIC
} psMemBlock;

The previousBlock and nextBlock is used to make a double-linked list out of the
memory blocks as to keep track of all the memory while allowing very efficient
alloc/free functionality.

The userMemorySize is used to calculate the end of the user area so that a
marker can be put there as to detect buffer overflows (i.e., writing beyond the
user space) as well as underflows (via endblock)."	defect	closed	high		PSLib SDRS	unspecified	normal	fixed		
