[Haiku-commits] r29412 - haiku/trunk/src/system/kernel/messaging
anevilyak at BerliOS
anevilyak at mail.berlios.de
Fri Mar 6 06:49:57 CET 2009
Author: anevilyak
Date: 2009-03-06 06:49:56 +0100 (Fri, 06 Mar 2009)
New Revision: 29412
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=29412&view=rev
Modified:
haiku/trunk/src/system/kernel/messaging/MessagingService.cpp
Log:
Add a TODO note.
Modified: haiku/trunk/src/system/kernel/messaging/MessagingService.cpp
===================================================================
--- haiku/trunk/src/system/kernel/messaging/MessagingService.cpp 2009-03-06 05:45:32 UTC (rev 29411)
+++ haiku/trunk/src/system/kernel/messaging/MessagingService.cpp 2009-03-06 05:49:56 UTC (rev 29412)
@@ -450,6 +450,14 @@
// delete the discarded areas (save one)
ObjectDeleter<MessagingArea> discardedAreaDeleter;
MessagingArea *discardedArea = NULL;
+ // TODO: this loop still has a flaw
+ // - if the first area in the list is full,
+ // we will always allocate a new area to add the next message to,
+ // even if we already have another area in the chain with enough space
+ // if the allocation fails this probably needs to walk the list
+ // and keep trying for each non-empty area it finds until it either
+ // succeeds or hits the last area. Only in the latter case should we
+ // be allocating a new one.
while (fFirstArea != fLastArea) {
area = fFirstArea;
area->Lock();
More information about the Haiku-commits
mailing list