Linux SoftwareProgrammingLibrariessmalloc 1.0

smalloc 1.0


smalloc short from Static memory buffer malloc, is an ideal memory manager for Realtime Linux Kernel modules that can't use dynamic m
Developer:   Calin A Culianu
      more software by author →
Price:  0.00
License:   Public Domain
File size:   6K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


smalloc short from Static memory buffer malloc, is an ideal memory manager for Realtime Linux Kernel modules that can't use dynamic memory offered by kmalloc because of the non-realtime nature of kmalloc.

Like malloc(), smalloc() doles out memory to client code. Unlike malloc, however, smalloc takes a static memory buffer (as an initialization parameter). It is this buffer that smalloc manages when doling out memory to client code.

This design makes smalloc ideal for use inside a Realtime Linux kernel module. It also makes it much easire to port userspace code that relies on malloc() in C or operator new() in C++ for memory management to a realtime kernel module.

For example:

(the below is linux kernel code)

< code >

#include "smalloc.h"
#include < linux/slab.h >

#define MEMPOOLSZ (1024*1024*1024)
char *buf;

...

buf = kmalloc(MEMPOOLSZ, GFP_KERNEL); /* 1 megabyte buffer in kernel
module.. */
smalloc_set_memory_pool(buf, sizeof(buf));

...

MyStruct *s;

s = smalloc(sizeof(MyStruct)); /* example of code that uses this
static memory buffer */

< /code >

The above example is a typical usage pattern of smalloc.
tags kernel module  static memory  linux kernel  memory buffer  code that  client code  out memory  realtime linux  

Download smalloc 1.0


 http://www.rtlab.org/software/smalloc.tar.gz


Authors software

smalloc 1.0 (by Calin A Culianu)
smalloc short from Static memory buffer malloc, is an ideal memory manager for Realtime Linux Kernel modules that can't use dynamic m


Similar software

smalloc 1.0 (by Calin A Culianu)
smalloc short from Static memory buffer malloc, is an ideal memory manager for Realtime Linux Kernel modules that can't use dynamic m

DUMA 2.4.27 (by Hayati Ayguen)
DUMA (Detect Unintended Memory Access) stops your program on the exact instruction that overruns (or underruns) a malloc() memory buf

Electric Fence 2.1.13 (by Bruce Perens)
Electric Fence (efence) is an open-source library to detect buffer overruns and under-runs in C programs

The Hoard Scalable Memory Allocator 3.5.1 (by Emery Berger)
The Hoard Scalable Memory Allocator is a scalable memory allocator (malloc replacement) for multithreaded applications.

The Hoard

log-malloc 2006-10-26 (by Kefeer)
log-malloc is a simple malloc/free logger

Measuring Buffer 20060728 (by Thomas Maier-Komor)
Measuring Buffer is an enhanced version of buffer

libshbuf 0.0.3 (by Lennart Poettering)
libshbuf introduces a new IPC concept: the "shared buffer", a more flexible and faster alternative for standard Unix FIFOs.

Take som

WMMemFree 0.7 (by Draghicioiu Mihai)
WMMemFree shows system memory usage

nedmalloc 1.04 Alpha (by Niall Douglas)
nedmalloc an alternative malloc implementation written in C for multiple threads without lock contention based on dlmalloc v2.8.3.

ftRTOS 0.1 (by Alexander Yaworsky)
ftRTOS is another free and small realtime kernel for microcontrollers focused on minimal RAM usage


Other software in this category

zlib 1.2.3 (by Jean-loup Gailly)
zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

libjpeg v6b (by Independent JPEG Group)
libjpeg is a library for handling the JPEG (JFIF) image format

OpenSSL 0.9.7c (by The OpenSSL Project Team)
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

libxml2 2.6.27 (by DV)
Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

GNU C library 2.4 (by Andreas Jaeger)
GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

GNU C library is us

    search


Featured Software

jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java

Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser

GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


Subscribe in Rojo
Google Reader
Add to My Yahoo!

Add to My AOL
Subscribe with Bloglines
Subscribe in NewsGator Online
Add 'nixbit linux software' to Newsburst from CNET News.com
del.icio.us nixbit linux software


Top tags