TITLE: SCMO Functions not aware of 8 byte alignment
DESCRIPTION:
void SCMOInstance::setHostName_l(const char* hostName, Uint32 len)
{
// Copy on Write is only necessary if a realloc() becomes necessary
void SCMOInstance::setHostName_l(const char* hostName, Uint32 len)
{
// Copy on Write is only necessary if a realloc() becomes necessary
- if (inst.mem->freeBytes < len)
+ if (inst.mem->freeBytes < ((len+8) & ~7))
void SCMOInstance::setNameSpace_l(const char* nameSpace, Uint32 len)
{
// Copy on Write is only necessary if a realloc() becomes necessary
void SCMOInstance::setNameSpace_l(const char* nameSpace, Uint32 len)
{
// Copy on Write is only necessary if a realloc() becomes necessary
- if (inst.mem->freeBytes < len)
+ if (inst.mem->freeBytes < ((len+8) & ~7))
// Init memory from unaligned start up to the size required with alignment
// to zero.
memset(&((char*)(*pmem))[start],0,(size_t)reqAlignSize);
// Init memory from unaligned start up to the size required with alignment
// to zero.
memset(&((char*)(*pmem))[start],0,(size_t)reqAlignSize);
+ PEGASUS_DEBUG_ASSERT(
+ ((*pmem)->freeBytes+(*pmem)->startOfFreeSpace) == (*pmem)->totalSize);