CVS update: samba/source/lib

Luke Kenneth Casson Leighton lkcl at
Wed Jul 19 10:31:12 GMT 2000



this seems to imply that a uint32, void** is not good enough.  that what
is needed is something simpilar to that used in apache: ap_table
structure, maybe.

or, using talloc and trealloc or sander's mem-alloc code.

	uint32 size;
	uint32 alloced_size; /* multiple of 16? 32? */
	void** array;

is another alternative.


On Wed, 19 Jul 2000, Tim Potter wrote:

> Luke Kenneth Casson Leighton writes:
> > > I would like to replace the use of util_array.c functions 
> > > in the rest of the source tree if no one objects.
> >
> > i object.  if you want a list-associating "thing", use a list.  in the
> > cases where you want an array-associating "thing" use an array.
> On a slightly different note, I've noticed a problem with very
> large arrays.  The memory allocator in glibc 2.1 seems to crash
> with arrays of about 40,000 elements, probably because of
> fragmentation caused by calls to realloc().  If it's possible to
> determine the size of the array beforehand, I tend to malloc()
> the array beforehand and copy elements in using array
> assignment. 
> Tim.

<a href=" mailto:lkcl at" > Luke Kenneth Casson Leighton    </a>
<a href=""  > Samba and Network Development   </a>
<a href=""      > Samba Web site                  </a>
ISBN1578701503 DCE/RPC over SMB: Samba and Windows NT Domain Internals

More information about the samba-technical mailing list