allocated blocks holding pointers to other allocated blocks

Niels Möller nisse at lysator.liu.se
Thu Mar 6 20:28:37 UTC 2014


David Warme <David at Warme.net> writes:

> The GMP manual on Custom Allocation contains the following paragraph:
>
> 	GMP may use allocated blocks to hold pointers to other allocated
> 	blocks.  This will limit the assumptions a conservative garbage
> 	collection scheme can make.
>
> Questions:
>
> 2. What places within GMP use this technique (pervasive, or hopefully
>    just a few places)?

It's not very common. I can't give any example off the top of my head
where it is used. I'd expect most pointer arrays to be small, and
allocated on the stack.

You may want to have a look at what guile is doing in its interface
between gmp and the garbage collector. I'm sure it has been discussed
before, but I don't remember the conclusions.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list