summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b3d7112)
raw | patch | inline | side by side (parent: b3d7112)
author | Justin Sobota <jsobota@ti.com> | |
Fri, 30 Oct 2015 19:43:38 +0000 (15:43 -0400) | ||
committer | Justin Sobota <jsobota@ti.com> | |
Fri, 30 Oct 2015 19:43:38 +0000 (15:43 -0400) |
Signed-off-by: Justin Sobota <jsobota@ti.com>
src/rm_allocator.c | patch | blob | history |
diff --git a/src/rm_allocator.c b/src/rm_allocator.c
index e803b65c4eb0a1113882ade56aa0cd7455d031fd..242fd3d0a1d10c51bc2ab98eb296c89b09ba3970 100644 (file)
--- a/src/rm_allocator.c
+++ b/src/rm_allocator.c
findNode.base += findNode.length;
} else {
/* Matching node allocated, move to next node */
- if ((nextNode = RB_NEXT(_Rm_AllocatorResourceTree,
- allocator->resourceRoot,
- matchingNode))) {
+ if (rmInst->instType == Rm_instType_SHARED_SERVER) {
+ nextNode = RB_NEXT_CACHED(_Rm_AllocatorResourceTree,
+ allocator->resourceRoot,
+ matchingNode);
+ } else {
+ nextNode = RB_NEXT(_Rm_AllocatorResourceTree,
+ allocator->resourceRoot,
+ matchingNode);
+ }
+ if (nextNode) {
findNode.base = nextNode->base;
} else {
retVal = RM_SERVICE_DENIED_RES_ALLOC_REQS_NOT_MET;