c - Why am I getting a memory access violation here? -
this file part of goahead webserver, implements fast block allocation scheme.
at line 284 web server process crashes, @ random times.
} else if ((bp = bqhead[q]) != null) { /* * take first block off relevant q if non-empty */ bqhead[q] = bp->u.next; //memory access violation here
what possible reasons this?
edit
bp pointer structure , union in this header file
typedef struct { union { void *next; /* pointer next in q */ int size; /* actual requested size */ } u; int flags; /* per block allocation flags */ } btype;
thanks.
here's possible reasons.
you've screwd , corrupted of data structures or stack.
bqhead
null or invalid pointerq
outside bounds ofbqhead
bp
null or invalid pointer
step through code debugger, or use printf debugging, , see if values if bqhead,q,bp should be.
Comments
Post a Comment