c-server memory management

Paul R. Bernard prb@REDACTED
Sun Jun 16 07:09:17 CEST 2002

I'm playing with a simple c-server using ic:gen(test.idl,
[{be,c_server}]).  Most of the parameters are simple types long, short
and so on.  In a couple cases however it seems a good idea to use the
builtin erlang:binary type for some of the data I'd like to pass

The generated function *__dec that deals with the functions that
handle the erlang:binary types are 'malloc'ing storage for them.  As
far as I can see this storage is not being freed so I'm assuming that
it's my responsibility to free this memory and I should be doing so in
the appropriate *__rs function.  Correct?  If not how should I be
doing it (assuming it's not a bug)?

I'm finding the IC manual a little unclear with regards to who is
supposed to do what in this situation.


- paul

More information about the erlang-questions mailing list