hooking core allocation failures

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Post Reply
jschall
Posts: 33
Joined: Wed Sep 06, 2017 4:29 am
Has thanked: 2 times
Been thanked: 1 time

hooking core allocation failures

Post by jschall »

Can a define be added for hooking core allocation failures?
e.g.:

Code: Select all

--- a/os/common/oslib/src/chmemcore.c
+++ b/os/common/oslib/src/chmemcore.c
@@ -123,6 +123,7 @@ void *chCoreAllocAlignedWithOffsetI(size_t size,
 
   /* Considering also the case where there is numeric overflow.*/
   if ((next > ch_memcore.endmem) || (next < ch_memcore.nextmem)) {
+    CH_CFG_CORE_ALLOCATOR_FAILURE_HOOK();
     return NULL;
   }
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: hooking core allocation failures

Post by Giovanni »

Hi,

Moving this topic in the "change request" forum.

It is possible but I cannot guarantee when, 18.1 is already being tested and would have to start over.

Giovanni


Last bumped by Giovanni on Sun Jan 20, 2019 3:26 pm.
Post Reply