Are custom blocks ever moved by the garbage collector?

,

Quick question here: are custom blocks ever relocated by the garbage collector? For instance, assuming that my custom block is being retained by a root I’ve placed somewhere (i.e. the custom block will not be collected), is it safe to hold onto and re-use the Data_custom_val(...) of the block across code that might cause garbage collection?

Custom block are relocated by the garbage collector (when promoted to the major heap or during compaction for instance).

1 Like