[M3devel] malloc/free from Modula-3?

Mika Nystrom mika at async.caltech.edu
Mon Apr 18 20:47:40 CEST 2011


"Daniel Alejandro Benavides D." writes:
>Hi all:
>the only thing you need to keep control as of CM3 is concerned is the modul=
>a-3 free calls equals the number of news, that is, if not is runtime error,=

Not exactly.  You can't necessarily call malloc/free from multiple threads.
This is a big problem for Modula-3 programs that call out to nontrivial C code.

(Why don't we wrap malloc/free ourselves in a special library?  Linker problems
I suppose... and I also suppose the effort should rather be on getting pthreads
working again than messing around with problems with user threads...)

     Mika



More information about the M3devel mailing list