[Oberon] Fw: FPGA - Bitmaps.Mod

Jörg joerg.straube at iaeth.ch
Fri Apr 7 12:52:30 CEST 2017


Hi

In Oberon, you normally don't need to deallocate memory, as there is a
background task called "garbage collector". Setting a pointer variable to
NIL is enough and in the background the memory will be deallocated for you.

Unfortunately, as "b.base" is not declared a POINTER to something but as
INTEGER (basically an address), the garbage collector does not reclaim the
memory pointed to by "b.base" automatically. So yes, you should deallocate
that memory by hand. I first have to study the garbage collector code in
detail to come up with a proposal for deallocation.

br
Jörg 

-----Original Message-----
From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Tomas
Kral
Sent: Freitag, 7. April 2017 12:21
To: oberon at lists.inf.ethz.ch
Subject: Re: [Oberon] Fw: FPGA - Bitmaps.Mod

Hi Joerg,

Thank you for this very useful example, so this

> Kernel.New(b.base, SYSTEM.ADR(b.size));

did the trick of dynamic allocation? While browsing through the
chapters mentioned by you, I cannot help asking further..

Do I have to explicitly deallocate `b.base' memory block block? 

Many thanks
Tomas
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list