develop.uap-core.de/git
/
uwplayer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add single instance mode
[uwplayer.git]
/
ucx
/
allocator.c
diff --git
a/ucx/allocator.c
b/ucx/allocator.c
index
7ccc6ff
..
e12255e
100644
(file)
--- a/
ucx/allocator.c
+++ b/
ucx/allocator.c
@@
-75,6
+75,20
@@
struct cx_allocator_s cx_default_allocator = {
};
CxAllocator *cxDefaultAllocator = &cx_default_allocator;
};
CxAllocator *cxDefaultAllocator = &cx_default_allocator;
+
+int cx_reallocate(
+ void **mem,
+ size_t n
+) {
+ void *nmem = realloc(*mem, n);
+ if (nmem == NULL) {
+ return 1;
+ } else {
+ *mem = nmem;
+ return 0;
+ }
+}
+
// IMPLEMENTATION OF HIGH LEVEL API
void *cxMalloc(
// IMPLEMENTATION OF HIGH LEVEL API
void *cxMalloc(