More optimization for Message2. It now uses a more lightweight BSimpleMallocIO instead of the full blown BMallocIO. This wastes less memory and reduces unnecessary overhead when unflattening.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13861 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
class BSimpleMallocIO;
|
||||
|
||||
class BMessageField {
|
||||
public:
|
||||
BMessageField();
|
||||
@@ -41,10 +43,9 @@ public:
|
||||
uint8 NameLength() const { return fName.Length(); };
|
||||
type_code Type() const { return fType; };
|
||||
|
||||
void AddItem(BMallocIO *item);
|
||||
void ReplaceItem(int32 index, BMallocIO *item,
|
||||
bool deleteOld = true);
|
||||
void RemoveItem(int32 index, bool deleteIt = true);
|
||||
void AddItem(BSimpleMallocIO *item);
|
||||
void ReplaceItem(int32 index, BSimpleMallocIO *item);
|
||||
void RemoveItem(int32 index);
|
||||
int32 CountItems() const { return fItems.CountItems(); };
|
||||
size_t SizeAt(int32 index) const;
|
||||
const void *BufferAt(int32 index) const;
|
||||
|
||||
Reference in New Issue
Block a user