UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
memory.cpp File Reference

Small utility that shows the size of some of the structs that are used in UFO:AI. More...

Go to the source code of this file.

Macros

#define STRUCTFORMAT   "%24s"
 
#define SIZEFORMAT   "%12s"
 
#define TYPESIZE(type)   printf(STRUCTFORMAT ": " SIZEFORMAT " KB\n", #type, MEMORY_HumanReadable(sizeof(type)));
 
#define UFO_SIZE_LENGTH_T   "%03zu"
 

Functions

static const char * MEMORY_HumanReadable (size_t size)
 
int main (int argc, char **argv)
 

Detailed Description

Small utility that shows the size of some of the structs that are used in UFO:AI.

Definition in file memory.cpp.

Macro Definition Documentation

#define SIZEFORMAT   "%12s"

Definition at line 28 of file memory.cpp.

Referenced by main().

#define STRUCTFORMAT   "%24s"

Definition at line 27 of file memory.cpp.

Referenced by main().

#define TYPESIZE (   type)    printf(STRUCTFORMAT ": " SIZEFORMAT " KB\n", #type, MEMORY_HumanReadable(sizeof(type)));

Definition at line 29 of file memory.cpp.

Referenced by main().

#define UFO_SIZE_LENGTH_T   "%03zu"

Definition at line 41 of file memory.cpp.

Referenced by MEMORY_HumanReadable().

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 62 of file memory.cpp.

References SIZEFORMAT, STRUCTFORMAT, and TYPESIZE.

static const char* MEMORY_HumanReadable ( size_t  size)
static

Definition at line 45 of file memory.cpp.

References UFO_SIZE_LENGTH_T, and UFO_SIZE_T.