memory management questions (argus-3.0.0.rc.27)

Carter Bullard carter at qosient.com
Mon Aug 28 23:27:24 EDT 2006


Hey Gabriel,
The ARGUS_ALIGN_128 is there for 2 reasons.  On some machines
that can do 128 bit loads, compares, etc...  it is important that some
memory reads are done in the right place, i.e. 128 bit aligned, and some
of the (long long) fetches are also required to be 64-bit aligned on  
some
machines.  This does that so that all memory allocations start on 128  
bit
boundaries, which in turn aligns everything up right.

The ArgusAllocBytes is there just for debug purposes, so I'll take it
out fo the MarRecord stats.

Carter


On Aug 28, 2006, at 4:49 PM, Gabriel L. Somlo wrote:

> Carter,
>
> I've been looking over the memory management functions in
> common/argus_util.c, and have a few questions:
>
> 	1. What's with ARGUS_ALIGN_128 ? Is argus doing anything
> 	   DMA related that benefits from it (or requires it) ?
> 	   Do we need it in GPL argus or is it a leftover from
> 	   gargoyle (which I recall you mentioning *does* handle
> 	   hardware directly, not just via libpcap) ?
>
> 	2. ArgusAllocBytes: it's used for printing out stats from
> 	   ArgusGenerateStatusMarRecord(), but doesn't reflect
> 	   reality at all (unless ARGUSMEMDEBUG is defined, it
> 	   is only ever incremented by ArgusMalloc() and ArgusCalloc(),
> 	   but never decremented by ArgusFree()). Unless you have
> 	   ARGUSMEMDEBUG turned on, there isn't even a precise way to
> 	   know by how much to decrement ArgusAllocBytes, so maybe
> 	   we should only ever use it for debugging ?
>
> No big deal either way, just trying to figure out how things work :)
>
> Thanks,
> Gabriel
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20060828/a55592b1/attachment.html>


More information about the argus mailing list