Documentation Project 1
ContentsIndexHome
PreviousUpNext
sack::memory::NewPlus Macro
C++
#define NewPlus(type,extra) ((type*)Allocate(sizeof(type)+(extra)))
Parameters 
Description 
type 
passed to sizeof() 
extra 
Number of additional bytes to allocate beyond the sizeof( type ) 

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.

Create a text segment plus 18 characters of data. (This should not be done, use SegCreate instead)

PTEXT text = NewPlus( TEXT, 18 ); 
Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!