CVS update: samba/source/lib
Luke Kenneth Casson Leighton
lkcl at samba.org
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
or, using talloc and trealloc or sander's mem-alloc code.
uint32 alloced_size; /* multiple of 16? 32? */
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
<a href=" mailto:lkcl at samba.org" > Luke Kenneth Casson Leighton </a>
<a href=" http://cb1.com/~lkcl" > Samba and Network Development </a>
<a href=" http://samba.org" > Samba Web site </a>
ISBN1578701503 DCE/RPC over SMB: Samba and Windows NT Domain Internals
More information about the samba-technical