|
JX Application Framework
|
#include <JMMRecord.h>
Public Types | |
| enum | Type { kManager = -2 , kLibrary = -1 , kApp = 0 , kBucket1 = 1 , kBucket2 = 2 , kBucket3 = 3 } |
Public Member Functions | |
| JMMRecord () | |
| JMMRecord (const JUInt32 id, const void *address, const size_t size, const JUtf8Byte *file, const JUInt32 lineNumber, const int type, const bool array) | |
| JUInt32 | GetID () const |
| const void * | GetAddress () const |
| size_t | GetSize () const |
| const JUtf8Byte * | GetNewFile () const |
| JUInt32 | GetNewLine () const |
| const JUtf8Byte * | GetDeleteFile () const |
| JUInt32 | GetDeleteLine () const |
| void | SetDeleteLocation (const JUtf8Byte *deleteFile, const JSize deleteLine, const bool arrayDelete) |
| bool | IsDeleted () const |
| bool | IsArrayNew () const |
| bool | IsArrayDelete () const |
| const JUtf8Byte * | NewTypeName () const |
| const JUtf8Byte * | DeleteTypeName () const |
| bool | IsManagerMemory () const |
| bool | IsLibraryMemory () const |
| bool | IsAppMemory () const |
| int | GetMemoryBucket () const |
| void | StreamForDebug (std::ostream &output) const |
| void | PrintLayout () const |
Static Public Member Functions | |
| static const JUtf8Byte * | TypeName (const unsigned isArray) |
JMMRecord objects record statistics on a block allocated through JMemoryManager. For maximum space efficiency JMMRecord does NOT have a virtual destructor. It isn't intended to be a base class, so if you do subclass it be careful. 03/12/05 (Dustin Laurence) In fact, JMMRecord is just Plain Old Data (POD) except that it has constructors. The offsetof operator can only be called on POD, so JMMRecordData defines a POD type that PrintLayout can call offsetof on without generating stupid compiler warnings. This requires using assignment instead of initializers in the JMMRecord constructor, but this should not even incur a performance penalty because JMMRecordData contains only intrinsic POD types. Shutting up the compiler is the *ONLY* reason JMMRecordData exists, so don't use it for anything else. Base code generated by Codemill v0.1.0
| enum JMMRecord::Type |
| JMMRecord::JMMRecord | ( | ) |
| JMMRecord::JMMRecord | ( | const JUInt32 | id, |
| const void * | address, | ||
| const size_t | size, | ||
| const JUtf8Byte * | file, | ||
| const JUInt32 | lineNumber, | ||
| const int | type, | ||
| const bool | array | ||
| ) |
| const JUtf8Byte * JMMRecord::DeleteTypeName | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const JUtf8Byte * JMMRecord::NewTypeName | ( | ) | const |
| void JMMRecord::PrintLayout | ( | ) | const |
Prints the layout of a JMMRecord in memory. Useful for optimizing the memory manager's memory usage on a particular architecture, which can be important considering how many records can potentially be stored.
This method ought to be static but isn't to accomodate certain compilers implement sizeof() and/or offsetof(). It isn't very hard to use the default constructor to create a throwaway object anyway.
03/12/05 (Dustin)
PrintLayout now prints the layout of JMMRecordData so picky compilers won't complain about applying offsetof to a non-POD type. It would be legal (though stupid) according to the standard for JMMRecord to not be identical to JMMRecordData, but that doesn't matter because the JMMRecordData part of JMMRecord would surely be bitwise identical to JMMRecordData anyway and therefore optimizing the packing of JMMRecordData amounts to optimizing of JMMRecord.
| void JMMRecord::SetDeleteLocation | ( | const JUtf8Byte * | deleteFile, |
| const JSize | deleteLine, | ||
| const bool | arrayDelete | ||
| ) |
| void JMMRecord::StreamForDebug | ( | std::ostream & | output | ) | const |
Dual function is jx_memory_debugger Record constructor.
|
static |