summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/textbuf.c
diff options
context:
space:
mode:
author Couriersud <couriersud@users.noreply.github.com>2010-01-17 19:19:48 +0000
committer Couriersud <couriersud@users.noreply.github.com>2010-01-17 19:19:48 +0000
commit91c5f19bf3ca66fce3d039a2acbfb6e1bba20cfb (patch)
treeed7913067ed74268edc6a9ea6ad7dd47edc1cb2f /src/emu/debug/textbuf.c
parent865ef1e9fc5028ad785feffd000a455b7ca8224b (diff)
All files modified here solely depend on osdcore.h. Therefore changed all malloc/free to osd_malloc and osd_free.
Diffstat (limited to 'src/emu/debug/textbuf.c')
-rw-r--r--src/emu/debug/textbuf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/emu/debug/textbuf.c b/src/emu/debug/textbuf.c
index 0576ff4f642..828887f6b66 100644
--- a/src/emu/debug/textbuf.c
+++ b/src/emu/debug/textbuf.c
@@ -88,24 +88,24 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
text_buffer *text;
/* allocate memory for the text buffer object */
- text = (text_buffer *)malloc(sizeof(*text));
+ text = (text_buffer *)osd_malloc(sizeof(*text));
if (!text)
return NULL;
/* allocate memory for the buffer itself */
- text->buffer = (char *)malloc(bytes);
+ text->buffer = (char *)osd_malloc(bytes);
if (!text->buffer)
{
- free(text);
+ osd_free(text);
return NULL;
}
/* allocate memory for the lines array */
- text->lineoffs = (INT32 *)malloc(lines * sizeof(text->lineoffs[0]));
+ text->lineoffs = (INT32 *)osd_malloc(lines * sizeof(text->lineoffs[0]));
if (!text->lineoffs)
{
- free(text->buffer);
- free(text);
+ osd_free(text->buffer);
+ osd_free(text);
return NULL;
}
@@ -126,10 +126,10 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
void text_buffer_free(text_buffer *text)
{
if (text->lineoffs)
- free(text->lineoffs);
+ osd_free(text->lineoffs);
if (text->buffer)
- free(text->buffer);
- free(text);
+ osd_free(text->buffer);
+ osd_free(text);
}