[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1a7b27a4-1030-c30f-03e8-0868ee9ea6b9@aravind.cc>
Date: Thu, 20 Feb 2025 19:26:10 -0500
From: Aravind Ceyardass <aravind.pub@...il.com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, torvalds@...ux-foundation.org, kees@...nel.org
Subject: NEW GCC EXTENSION for kernel memory management.
Hello Kernel People,
I have developed a new GCC extension called reftrack that could be used for reference counting. Instead of manually adding code for
add()/dec() the reference count, it could be generated by this extension.
1-minute intro
If you have a structure S like this
typedef struct S S;
S *p = ... , *q = ...;
p = q;
It gets transformed into
typedef struct S S;
S *p = ... , *q = ...;
S_addref(q);
S_removeref(p);
p = q;
The extension is available at https://github.com/acbits/reftrack-plugin. I have also attached a prototype kernel implementation with this email.
All suggestions welcome.
Regards
Aravind
View attachment "lkrcmm.h" of type "text/x-chdr" (12586 bytes)
View attachment "reftrack.h" of type "text/x-chdr" (880 bytes)
Powered by blists - more mailing lists