Memory access violation after manipulating _m128i pointer.
- From: Rakesh Simpi <RakeshSimpi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Aug 2008 03:23:02 -0700
In my program, i need to manipulate the _m128* POINTER to nevigate through
some memory chunk. Nevigating via POINTER++/-- works absolutely fine; but,
when i try to nevigate this POINTER by more or less than 16 bytes, i get
memory access violation error.
this is how my code looks like:
__m128i *row = (__m128i *)Source; //Source points to an aligned memory
WIDTH_OFFSET = 4; //some non zero number < 16
for(OFFSET = 0; some_condition; OFFSET = WIDTH_OFFSET)
{
row = (__m128i *)((UCHAR*)row - OFFSET) - 1;
*row = _mm_andnot_si128(*row, mmFF);
//mmFF is an initialized _m128i variant
}
here execution is fine in the first entrance of the loop(while OFFSET = 0);
but when i try to increment/decrement the POINTER by (say) 4 bytes, upon next
usage of that POINTER i get a runtime error saying memory access violation.
do help me out with a solution ! thanks.
.
- Prev by Date: Re: Direct show sample
- Next by Date: Re: Get access to the playback mic volume control by in vc++ win32
- Previous by thread: Re: Direct show sample
- Next by thread: Re: Vista Master and Wave Out volumes - Same?
- Index(es):
Relevant Pages
|
Loading