hi All,

        I have a multithreaded c/c++ app containing a simple
(self-developed)
        queue. 3 operations -'insert(..)',  'retrieve()' & 'length()'.
        As part of 'retrieve' a call to 'delete' is made to remove the
        head of the queue. Only 2 threads ever use this queue - strictly one
for
        inserting and another for retrieving ( and yes access is mutex
protected
        on all 3 operations ).

        Although very _infrequent_, the problem is that the call
        to delete in retrieve causes segmentation violation. It is a real
nuisance as
        one may run the app many times without fail but on some occassions 
        it fails. 

        Has anyone encountered/resolved simliar problems in anyother app ? 
        Could this issue be the result of word alignment ? 
        I suspect a memory corruption - but I cannot seem to figure out 
        when/where/how it could happen.

        One characteristic of the app is that this queue is hammered quite
        intensively - both inserts and retrieves.

        Any hints much appreciated. Thanks in advance.

Regards,
Rajnish

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to