Leases based on MAC addresses
Glenn.Satchell at uniq.com.au
Tue Feb 17 14:33:05 UTC 2009
>Date: Tue, 17 Feb 2009 07:08:30 -0700
>From: Elliot Finley <lists at efinley.com>
>To: Users of ISC DHCP <dhcp-users at lists.isc.org>
>Subject: Re: Leases based on MAC addresses
>X-BeenThere: dhcp-users at lists.isc.org
>David W. Hankins wrote:
>> On Mon, Feb 16, 2009 at 01:04:37PM -0700, Elliot Finley wrote:
>>> tuid = (unsigned char *)dmalloc (lt -> uid_max, MDL);
>>> if (!tuid)
>>> log_fatal ("no memory for large uid.");
>>> memcpy (tuid, d1.data, lt -> uid_len);
>>> ! //EOFlt -> uid = tuid;
>> That's a memory leak.
>After running with this patch for the last 16 hours on a relatively busy
>server (lease file has about 42000 leases, it hands out about 2-3 leases
> per second), the memory used (as shown by 'top') hasn't changed at all.
If you don't need to reference tuid again, maybe you can comment out
the preceding memcpy() line?
It takes a lot of 7 bytes strings to get to 1MB of extra memory. :)
More information about the dhcp-users