Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
xenomai
Commits
a409c18d
Commit
a409c18d
authored
Apr 23, 2018
by
Philippe Gerum
Browse files
copperplate/heapobj-pshared: add helper to return the total heap size
parent
dc63a21a
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/copperplate/heapobj.h
View file @
a409c18d
...
...
@@ -304,6 +304,8 @@ size_t heapobj_validate(struct heapobj *hobj,
size_t
heapobj_inquire
(
struct
heapobj
*
hobj
);
size_t
heapobj_get_size
(
struct
heapobj
*
hobj
);
int
heapobj_bind_session
(
const
char
*
session
);
void
heapobj_unbind_session
(
void
);
...
...
lib/copperplate/heapobj-pshared.c
View file @
a409c18d
...
...
@@ -1092,6 +1092,12 @@ size_t heapobj_inquire(struct heapobj *hobj)
return
heap
->
ubytes
;
}
size_t
heapobj_get_size
(
struct
heapobj
*
hobj
)
{
struct
shared_heap
*
heap
=
__mptr
(
hobj
->
pool_ref
);
return
heap
->
total
;
}
void
*
xnmalloc
(
size_t
size
)
{
return
alloc_block
(
&
main_heap
.
heap
,
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