Sack Library Documentation
ContentsIndexReferenceHome
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 ); 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!