mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 07:41:20 -04:00
added a memory management class for small objects.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4046 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
db19db7e60
commit
827dbd8cf3
8 changed files with 538 additions and 4 deletions
|
@ -56,6 +56,8 @@
|
|||
* 8 bits: SubType
|
||||
******************************************************************/
|
||||
|
||||
#include <util/smallobject.h>
|
||||
|
||||
const uint8_t RS_PKT_VERSION1 = 0x01;
|
||||
const uint8_t RS_PKT_VERSION_SERVICE = 0x02;
|
||||
|
||||
|
@ -65,11 +67,15 @@ const uint8_t RS_PKT_CLASS_CONFIG = 0x02;
|
|||
const uint8_t RS_PKT_SUBTYPE_DEFAULT = 0x01; /* if only one subtype */
|
||||
|
||||
|
||||
class RsItem
|
||||
class RsItem: public RsMemoryManagement::SmallObject
|
||||
{
|
||||
public:
|
||||
RsItem(uint32_t t);
|
||||
RsItem(uint8_t ver, uint8_t cls, uint8_t t, uint8_t subtype);
|
||||
#ifdef DO_STATISTICS
|
||||
void *operator new(size_t s) ;
|
||||
void operator delete(void *,size_t s) ;
|
||||
#endif
|
||||
|
||||
virtual ~RsItem();
|
||||
virtual void clear() = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue