Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
b7515769
Commit
b7515769
authored
Oct 10, 2014
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change name of roundup function to avoid MacOSX name clash
parent
8ffd07f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Heap.c
src/Heap.c
+4
-3
No files found.
src/Heap.c
View file @
b7515769
...
...
@@ -13,6 +13,7 @@
* Contributors:
* Ian Craggs - initial API and implementation and/or initial documentation
* Ian Craggs - use tree data structure instead of list
* Ian Craggs - change roundup to Heap_roundup to avoid macro name clash on MacOSX
*******************************************************************************/
/**
...
...
@@ -74,7 +75,7 @@ static char* errmsg = "Memory allocation error";
* @param size the size actually needed
* @return the rounded up size
*/
int
roundup
(
int
size
)
int
Heap_
roundup
(
int
size
)
{
static
int
multsize
=
4
*
sizeof
(
int
);
...
...
@@ -142,7 +143,7 @@ void* mymalloc(char* file, int line, size_t size)
int
filenamelen
=
strlen
(
file
)
+
1
;
Thread_lock_mutex
(
heap_mutex
);
size
=
roundup
(
size
);
size
=
Heap_
roundup
(
size
);
if
((
s
=
malloc
(
sizeof
(
storageElement
)))
==
NULL
)
{
Log
(
LOG_ERROR
,
13
,
errmsg
);
...
...
@@ -285,7 +286,7 @@ void *myrealloc(char* file, int line, void* p, size_t size)
int
filenamelen
=
strlen
(
file
)
+
1
;
checkEyecatchers
(
file
,
line
,
p
,
s
->
size
);
size
=
roundup
(
size
);
size
=
Heap_
roundup
(
size
);
state
.
current_size
+=
size
-
s
->
size
;
if
(
state
.
current_size
>
state
.
max_size
)
state
.
max_size
=
state
.
current_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment