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.
jschall
Posts: 31
Joined: Wed Sep 06, 2017 4:29 am
Has thanked: 2 times

hooking core allocation failures

Postby jschall » Wed Dec 13, 2017 6:44 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: hooking core allocation failures

Postby Giovanni » Sun Jan 20, 2019 3:26 pm

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.


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 14 guests