Rewrite and activate message passing by area. Passing by area works now with

the new sematic of transfer_area so a message area is transfered into the right
teams' address space and it does not need to be cloned there anymore. Passing
by area is only used for messages bigger than a certain size (currently
hardcoded to 40KB) which should be somehow bound to the max port message size.
This makes passing large messages (i.e. > the port limit) possible, so for
example copy&paste of long text, image data, etc. should now work.
Got rid of the fClonedArea member as it is not necessary with the new design,
renamed shared_area to message_area in the private message_header, avoid
an unnecessary allocation of the header for the copy constructors, check
allocations in a few more places and some minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24321 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-03-09 13:35:41 +00:00
parent d1189f0b05
commit a433b9febf
3 changed files with 118 additions and 70 deletions
+2 -3
View File
@@ -257,7 +257,7 @@ class BMessage {
friend class Private;
friend class BMessageQueue;
status_t _InitCommon();
status_t _InitCommon(bool initHeader);
status_t _InitHeader();
status_t _Clear();
@@ -284,14 +284,13 @@ class BMessage {
message_header* fHeader;
field_header* fFields;
uint8* fData;
area_id fClonedArea;
mutable BMessage* fOriginal;
BMessage* fQueueLink;
// fQueueLink is used by BMessageQueue to build a linked list
uint32 fReserved[10];
uint32 fReserved[11];
// deprecated
BMessage(BMessage *message);
+1 -1
View File
@@ -68,7 +68,7 @@ struct BMessage::message_header {
int32 target;
int32 current_specifier;
area_id shared_area;
area_id message_area;
// reply info
port_id reply_port;