Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 2013 04:04:26 +0100
From:      dt71@gmx.com
To:        Luigi Rizzo <rizzo@iet.unipi.it>, Adrian Chadd <adrian@freebsd.org>,  freebsd-current <freebsd-current@freebsd.org>, jb <jb.1234abcd@gmail.com>
Subject:   Re: [RFC] how to get the size of a malloc(9) block ?
Message-ID:  <529AA73A.9@gmx.com>
In-Reply-To: <20131201022002.GE55638@funkthat.com>
References:  <CA%2BhQ2%2BgK1pc_aS1LEKp29Bi=MHFtJCkw2uOrib_9wQ-7AziH=w@mail.gmail.com> <loom.20131130T002152-608@post.gmane.org> <CA%2BhQ2%2Bj0cYW0dfhEtMGRXWhXhS=VF_N_ZB=JmcqRUofFKWXFiQ@mail.gmail.com> <CAJ-Vmon2dy94jCUwrBjObrxahmaTyqYZJZo4Lren2Km_vX3_OA@mail.gmail.com> <CA%2BhQ2%2Bi7woEM9x7Ymo%2BD4FbG2rn0eRYnX=7mUTrPjDqj-pme7A@mail.gmail.com> <20131201022002.GE55638@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John-Mark Gurney wrote, On 12/01/2013 03:20:
> Either it happens rarely, and always doing a realloc won't hurt
> performance, or it happens often, and then you should be using a larger
> buffer in the first place..

What if a size-elastic implementation of a dynamic data structure would be able to adjust to the malloc implementation, such as agreeing to allocate regions of size (2^k - 8)? Much like the use of getpagesize() (yes, I know it's not part of a technical standard).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?529AA73A.9>