6 Commits

Author SHA1 Message Date
Jef Driesen
e4108a3b33 Fixed an off-by-one error. 2009-12-02 13:55:50 +00:00
Jef Driesen
21832851af Add a function to slice the buffer. 2009-11-16 08:14:19 +00:00
Jef Driesen
12754e05f4 Initialize allocated memory to zero when resizing. 2009-11-16 08:10:53 +00:00
Jef Driesen
a3264bc471 Implement a more efficient buffer growing strategy. 2009-11-10 11:35:29 +00:00
Jef Driesen
74272f4d77 Avoid undefined behaviour with NULL pointers.
We accept NULL pointers if the size is zero, but the C standard
library functions memcpy and memmove requires valid pointers, even if
the size is zero.
2009-11-10 11:35:19 +00:00
Jef Driesen
d3028dc2d7 Add a new memory buffer class. 2009-11-10 11:35:09 +00:00