c++ - Block level using LRU method -
iam having following problem.
i working on project , need use libraries have not access in code. in libraries there function read(int,int,void*). third parameter return pointer block can gain access. however, after many reads , because of lru method in block level, when have stored in variable void block pointer block, loose access in @ point.
i tried make :
char temp[block_size]; memcpy(temp,block,block_size);
after reads know loose , use temp instead of block didn't work. have ideas solving problem? thanks!
are sure maximum memory allocated block block_size? if can share code snippet calling read function
Comments
Post a Comment