Port driver memory free
Wed Mar 23 08:28:53 CET 2005
Thanks for your advice.
I would like to do what you mentioned below. But to do that, don't I have to
change the architecture of Port Driver to a C Port or Node? In which case I
will need to use different encode/decode and communication methods. With
that I will not be able to see what's exactly happening with the current
Port Driver scenario. I will not get dirver->control or driver->call
To give you an understanding, the C code that I wrote myself is very minimal
to send and receive data to and from the underline protocol stack. Most of
the C code is written to encode/decode objects pass between Erlang and C. So
if I have to change the Architecture to convert my Port driver to an
external Port or Node, I loose the track of the memory leak point.
Please correct me if I am wrong.
Sent: Wednesday, March 23, 2005 1:19 PM
To: Casper; ;
Subject: RE: Port driver memory free
On Wed, 23 Mar 2005 11:15:40 +0600, "Casper" <>
> More updates....
> Today when I checked the system, the Beam memory consumption was 253MB.
Most powerful tool in debugging is diffrential analysis. Differential
analysis means you take version of the code with desirable properties
and version of program with ugly properties and step by step make them
more and more the same. In this process you one day make one step which
turns good program into evil program and then that is the time when you
know exactly which step take you to hell.
Your case your having troubles with drivers. You say
> Is there anyway to check the C port memory allocation?
the obvious answer is "turn your linking driver into own program which
communicates with Erlang through a socket". Now unix tell you exactly
where memory being used. Maybe you then have good version of your
program which let you think about which step is needed to make it evil
out of control memory eating beast.
But now your not using deferential analysis. You are using ask mailing
list a lot of clueless questions type of analysis.
More information about the erlang-questions