From 35127b5d1be3343df720956cccb2ebacb82d0b74 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Tue, 18 Mar 2003 02:32:38 +0000 Subject: [PATCH] comment --- panda/src/putil/uniqueIdAllocator.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/panda/src/putil/uniqueIdAllocator.h b/panda/src/putil/uniqueIdAllocator.h index e056d7c50e..347359b4ff 100644 --- a/panda/src/putil/uniqueIdAllocator.h +++ b/panda/src/putil/uniqueIdAllocator.h @@ -27,7 +27,21 @@ typedef unsigned long U32; //////////////////////////////////////////////////////////////////// // Class : UniqueIdAllocator -// Description : +// Description : Manage a set of ID values from min to max inclusive. +// The ID numbers that are freed will be allocated +// (reused) in the same order. I.e. the oldest ID numbers +// will be allocated. +// +// This implementation will use 4 bytes per id number, +// plus a few bytes of management data. e.g. 10,000 +// ID numbers will use 40KB. +// +// There are other implementations that can better leverage +// runs of used or unused IDs or use bit arrays for the +// IDs. But, it takes extra work to track the age of +// freed IDs, which is required for what we wanted. If +// you would like to kick around other implementation +// ideas, please contact Schuyler. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA UniqueIdAllocator { PUBLISHED: