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:
Michael Lotz
2005-07-31 11:48:38 +00:00
parent 4835f2d292
commit 43abf8a345
7 changed files with 197 additions and 126 deletions
+5 -4
View File
@@ -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;