mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 02:25:34 -04:00
added compile option to use sanitizer and already fixed a few misalignment errors with it
This commit is contained in:
parent
941df6120a
commit
6a18e242bb
8 changed files with 35 additions and 12 deletions
|
@ -61,7 +61,7 @@ namespace RsMemoryManagement
|
|||
|
||||
inline bool chunkOwnsPointer(const Chunk& c,void *p) const
|
||||
{
|
||||
return p >= c._data && (static_cast<unsigned char *>(p)-c._data)/_blockSize < _numBlocks ;
|
||||
return intptr_t(p) >= intptr_t(c._data) && (intptr_t(static_cast<unsigned char *>(p))-intptr_t(c._data))/intptr_t(_blockSize)< intptr_t( _numBlocks );
|
||||
}
|
||||
|
||||
void printStatistics() const ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue