[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg 1.8.3.1, fixes sparc sigbus



On Sat, 13 Jan 2001, Ben Collins wrote:

> Ok, here's the patch I am going to commit to the v1_8 branch. It pretty
> much reduces nfmalloc down to setting up a linked list of malloc'd
> pointers. If it wasn't for dselect, nfmalloc wouldn't be needed. The
> only thing that calls reset_database() is dselect, which is the only
> thing that calls nffreeall(). Using nffreeall() is the only advantage of
> having nfmalloc in the first place.

I agree with Wichert, don't apply to 1.8.  You can apply the fix for the
sigbus on sparc, but major changes like this need to go to head.

> This code simplifies things a lot, should make it slightly faster (less
> function calls in nfmalloc.c), and probably wont affect memory usage at
> all. I seriously doubt the previous code was saving more than a few
> bytes, if not costing more bytes. We don't have a "union maxalign"
> allocated for each nfmalloc() now, so I'm willing to bet there is a
> memory savings, if anything.

I'll test this on HEAD to see if this uses less or more memory.  My gut says
less.  What might be interesting is to tabulate the varying sizes that get
allocated during a dpkg run, and look for patterns.

On that, does malloc pool like-sized objects into chunks?  Apt's cache
generator does something similiar to this.

> Maybe once dselect is gone, nfmalloc can be gone too.

I haven't profiled dselect yet, so don't give up the ship.

----BEGIN GEEK CODE BLOCK----
Version: 3.12
GCS d- s: a-- c+++ UL++++ P+ L++++ !E W+ M o+ K- W--- !O M- !V PS--
PE++ Y+ PGP++ t* 5++ X+ tv b+ D++ G e h*! !r z?
-----END GEEK CODE BLOCK-----
----BEGIN PGP INFO----
Adam Heath <doogie@debian.org>        Finger Print | KeyID
67 01 42 93 CA 37 FB 1E    63 C9 80 1D 08 CF 84 0A | DE656B05 PGP
AD46 C888 F587 F8A3 A6DA  3261 8A2C 7DC2 8BD4 A489 | 8BD4A489 GPG
-----END PGP INFO-----



Reply to: