Are there memory limits for external C modules?
david at quanterium.zzn.com
david at quanterium.zzn.com
Fri Feb 10 13:08:09 EST 2006
david at quanterium.zzn.com wrote:
> I was able to modify my C code so that instead of being a Python
> module, it runs as a standalone binary, and it works as it should.
> Calling it with os.spawn* works. The two versions are essentially the
> same, the primary differences being the necessary difference in how
> arguments and return values are handled.
>
> This will work if necessary, but I would think having it as a Python
> module would be slightly more elegant and efficient since we avoid the
> overhead of setting up new processes.
I was able to resolve this issue. I was missing a call into Ethereal
that allocated necessary memory. Now the Python module version works,
and some various GLib assert warnings I was getting have gone away as
well.
Some testing has shown that the Python module version is quicker; I'm
assuming that the overhead involved in setting up a separate process
was slowing things down. There was a noticeable difference.
- David
More information about the Python-list
mailing list