version 1.2, 2008/11/12 21:10:20
|
version 1.3, 2008/11/13 19:39:17
|
|
|
if (size < 1024) | if (size < 1024) |
size = 1024; | size = 1024; |
| |
|
#if defined(PEGASUS_TEST_VALGRIND) |
|
// Valgrind complains that we leave uninitialized bytes in this buffer so |
|
// we clear all newly allocated memory when testing with Valgrind. |
|
_data = (char*)calloc(1, size); |
|
#else |
_data = (char*)malloc(size); | _data = (char*)malloc(size); |
|
#endif |
| |
if (!_data) | if (!_data) |
{ | { |
|
|
| |
_end = _data + cap; | _end = _data + cap; |
_ptr = _data + m; | _ptr = _data + m; |
|
#if defined(PEGASUS_TEST_VALGRIND) |
|
// Valgrind complains that we leave uninitialized bytes in this buffer so |
|
// we clear all newly allocated memory when testing with Valgrind. |
|
memset(_ptr, 0, _end - _ptr); |
|
#endif |
} | } |
| |
bool CIMBuffer::getString(String& x) | bool CIMBuffer::getString(String& x) |