On 10 March 2017 at 23:35, Sergio Lopez <[email protected]> wrote:
> On 2017-03-10 17:51, Jiří Zárevúcky wrote: > >> On 25 February 2017 at 02:15, Sergio Lopez <[email protected]> wrote: >> The real problem here is that tmpfs implementation is trivial >> > > Well, a realloc implementation that always ends allocating a new chunk and > copying the contents also looks like a "real" problem to me ;-) > > It might seem that way, but there's any number of perfectly reasonable workflows that might force such pathological reallocs, regardless of how realloc itself tries to avoid it. On the other hand, making new size always be a multiple of old size (even non-integer multiple, like 1.2x) reduces worst-case complexity to O(n), compared to O(n^2) in the case with constant increases. Now that I think about it, that can be baked into realloc() too, by reserving that much memory automatically. In any case, making big tmpfs files split across several separately allocated buffers would improve performance even more.
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
