summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/buflib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h
index 7f534c6ce0..e805ebbf1b 100644
--- a/firmware/include/buflib.h
+++ b/firmware/include/buflib.h
@@ -129,6 +129,12 @@ struct buflib_callbacks {
129 void (*sync_callback)(int handle, bool sync_on); 129 void (*sync_callback)(int handle, bool sync_on);
130}; 130};
131 131
132/** A set of all NULL callbacks for use with allocations that need to stay
133 * locked in RAM and not moved or shrunk. These type of allocations should
134 * be avoided as much as possible to avoid memory fragmentation but it can
135 * suitable for short-lived allocations. */
136extern struct buflib_callbacks buflib_ops_locked;
137
132#define BUFLIB_SHRINK_SIZE_MASK (~BUFLIB_SHRINK_POS_MASK) 138#define BUFLIB_SHRINK_SIZE_MASK (~BUFLIB_SHRINK_POS_MASK)
133#define BUFLIB_SHRINK_POS_FRONT (1u<<31) 139#define BUFLIB_SHRINK_POS_FRONT (1u<<31)
134#define BUFLIB_SHRINK_POS_BACK (1u<<30) 140#define BUFLIB_SHRINK_POS_BACK (1u<<30)