No subject



Fri May 27 20:01:01 2005
Return-Path: xorp-cvs-admin@icir.org
Delivery-Date: Fri, 27 May 2005 13:02:02 -0700
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by tigger.icir.org (8.12.11/8.12.11) with ESMTP id j4RK22gF008567
	for <atanu@tigger.icir.org>; Fri, 27 May 2005 13:02:02 -0700 (PDT)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from fruitcake.ICSI.Berkeley.EDU (fruitcake.ICSI.Berkeley.EDU [192.150.186.11])
	by wyvern.icir.org (8.12.11/8.12.11) with ESMTP id j4RK218d042745
	for <atanu@icir.org>; Fri, 27 May 2005 13:02:01 -0700 (PDT)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from fruitcake.ICSI.Berkeley.EDU (localhost [127.0.0.1])
	by fruitcake.ICSI.Berkeley.EDU (8.12.10/8.12.9) with ESMTP id j4RK21lk019516;
	Fri, 27 May 2005 13:02:01 -0700 (PDT)
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by fruitcake.ICSI.Berkeley.EDU (8.12.10/8.12.9) with ESMTP id j4RK12lk019498
	for <xorp-cvs@icsi.berkeley.edu>; Fri, 27 May 2005 13:01:02 -0700 (PDT)
Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68])
	by wyvern.icir.org (8.12.11/8.12.11) with ESMTP id j4RK11OQ042725
	for <xorp-cvs@icir.org>; Fri, 27 May 2005 13:01:01 -0700 (PDT)
	(envelope-from atanu@icir.org)
Received: from xorpc.icir.org (localhost [127.0.0.1])
	by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j4RK11no005706
	for <xorp-cvs@icir.org>; Fri, 27 May 2005 13:01:01 -0700 (PDT)
	(envelope-from atanu@xorpc.icir.org)
Received: (from atanu@localhost)
	by xorpc.icir.org (8.12.11/8.12.3/Submit) id j4RK11II005705
	for xorp-cvs@icir.org; Fri, 27 May 2005 20:01:01 GMT
	(envelope-from atanu)
From: Atanu Ghosh <atanu@icir.org>
Message-Id: <200505272001.j4RK11II005705@xorpc.icir.org>
To: xorp-cvs@icir.org
X-XORP-CVS-Branch: HEAD
Subject: [Xorp-cvs] XORP cvs commit: xorp/libxorp
Sender: xorp-cvs-admin@icir.org
Errors-To: xorp-cvs-admin@icir.org
X-BeenThere: xorp-cvs@icir.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:xorp-cvs-request@icir.org?subject=help>
List-Post: <mailto:xorp-cvs@icir.org>
List-Subscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=subscribe>
List-Id: Mailing list for XORP CVS commit messages <xorp-cvs.icir.org>
List-Unsubscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=unsubscribe>
List-Archive: <http://mailman.ICSI.Berkeley.EDU/mailman/private/xorp-cvs/>
Date: Fri, 27 May 2005 20:01:01 GMT

CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	atanu@xorpc.icir.org	2005-05-27 20:01:01 UTC

XORP CVS repository


Modified files:
	libxorp       heap.cc heap.hh test_heap.cc timer.cc timer.hh 

Log message:
	The heap code allows a set of objects to be held as a priority
	queue. The timer code uses the heap code. The heap code itself holds
	little chunks of data (heap_entry) which it holds in a contiguous block
	of memory. The heap_entry holds a key and a pointer to the object. When
	an entry is added it is placed at the end of the heap and is bubbled
	into position. The most recent entry is at the head of the list. If a an
	entry is to be removed from the heap then it would necessary to search
	the whole heap for it, but wait, the heap can be configured to hold an
	index into the heap in the object itself cool.
	
	Both on the MIPS and Sparc the casts required to update the object
	itself have been causing problems. They require casting a void * to a
	char * in order to perform the arithmetic and then casting to an int *
	to do the update. Pavlin points out that an extra void * cast between
	the char * and int * solves the problem.
	
	Introduce a HeapBase, objects that are to be stored on the heap
	can inherit from it if they require removal from arbitary
	positions.
	
	Approved by: Pavlin

Revision  Changes                                Path
1.12      +16 -16;  commitid: 162642977c7c7ea6;  xorp/libxorp/heap.cc
1.8       +26 -20;  commitid: 162642977c7c7ea6;  xorp/libxorp/heap.hh
1.3       +16 -11;  commitid: 162642977c7c7ea6;  xorp/libxorp/test_heap.cc
1.22      +5 -5;  commitid: 162642977c7c7ea6;    xorp/libxorp/timer.cc
1.22      +2 -3;  commitid: 162642977c7c7ea6;    xorp/libxorp/timer.hh
_______________________________________________
Xorp-cvs mailing list
Xorp-cvs@icir.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs