Re: [PATCH v2 1/4] libgst: Fix comments

Lee Duhem <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <CAOSer0D+ktidKsWi1b2KTe7a98Q8zCZkWfY5Lzi=hB0DAxeHyw@mail.gmail.com>
Hello Holger,

On Sat, Dec 2, 2017 at 2:51 PM, Holger Freyther <[email protected]> wrote:

>
> > On 30. Nov 2017, at 17:31, Lee Duhem <[email protected]> wrote:
> >
>
> Hey!
>
>
>
> > /* Grows the allocated memory to SPACESIZE bytes, if it's not there
> > -   already.
> > -   the memory could not be allocated.  Should be called after the
> > -   sweep has occurred so that things are contiguous.  Ensures that the
> > -   OOP table pointers are fixed up to point to the new objects.  */
> > +   already. */
> > extern void _gst_grow_memory_to (size_t size)
>
> The "sweep" doesn't seem to be enforced (scavenge before as part of
> the init_mem, but if invoked through the primitive I don't see a sweep).
>

We should mention that this function should be called after memory is
properly initialized,
i.e. at least keep statement "Should be called after ..."


>
>
> Mentioning "_gst_fixup_object_pointers" and that no garbage is copied
> might be valuable? I will most likely apply as is but why did you
> decide to remove this?
>

What about saying something like "Compact old objects and grow oldspace to
SPACESIZE bytes,
if it's not there already.  Should be called after the sweep has occurred."

I removed these statements because it seems that they are does not match
with current
implementation of _gst_grow_memory_to ().  However, I did not find all the
change history
of that function, so maybe I have removed too much.

Regards,
lee


>
> cheers
>         holger
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.