A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Object::Aggregates Struct Reference

This data structure uses a classic C-style trick to hold an array of variable size without performing two memory allocations: the declaration of the structure declares a one-element array but when we allocate memory for this struct, we effectively allocate a larger chunk of memory than the struct to allow space for a larger variable sized buffer whose size is indicated by the element 'n'. More...

+ Collaboration diagram for ns3::Object::Aggregates:

Public Attributes

Objectbuffer [1]
 
uint32_t n
 

Detailed Description

This data structure uses a classic C-style trick to hold an array of variable size without performing two memory allocations: the declaration of the structure declares a one-element array but when we allocate memory for this struct, we effectively allocate a larger chunk of memory than the struct to allow space for a larger variable sized buffer whose size is indicated by the element 'n'.

Definition at line 244 of file object.h.

Member Data Documentation


The documentation for this struct was generated from the following file: