gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] ar_size takes an alloc_limits?


From: Tom Lord
Subject: Re: [Gnu-arch-users] ar_size takes an alloc_limits?
Date: Sat, 10 Jul 2004 14:39:24 -0700 (PDT)


    > From: Matthew Dempsky <address@hidden>

    > Why?

    > The current code doesn't use it at all, is it possible future
    > versions might?

Right.  It's all about how the interface constrains possible
implementations.

If ar_size did _not_ take an alloc limits, then every possible
implementation of the ar.h interface would _have_ to allocate extra
space to record the size of the array (or something equivalent to
that) regardless of what alloc_limits had been used to create the
array.

With the interface as it is, if a particular alloc_limits
implementation happens to record the size of allocated regions itself
(in a way that ar.c can get that information back) then, at least
in some cases, ar.c could avoid storing the size itself.

(Whether any such optimization will ever happen or not is another
matter.  I doubt it will anytime soon but I was trying to get the
interface right for the long term.)

-t





reply via email to

[Prev in Thread] Current Thread [Next in Thread]