From 204b456c7c08bc40ffe1f21575461d92a544e92b Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 9 Mar 2005 21:30:05 +0000 Subject: Initial runtime checkin. --- runtime/docs/html/alloc_8h-source.html | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 runtime/docs/html/alloc_8h-source.html (limited to 'runtime/docs/html/alloc_8h-source.html') diff --git a/runtime/docs/html/alloc_8h-source.html b/runtime/docs/html/alloc_8h-source.html new file mode 100644 index 00000000..ba908655 --- /dev/null +++ b/runtime/docs/html/alloc_8h-source.html @@ -0,0 +1,53 @@ + + +SystemTap: SystemTap Runtime Library + + +
Intro | Functions | Defines | Enumerations | Enumeration Values
+ + +

alloc.h

Go to the documentation of this file.
00001 enum errorcode { ERR_NONE=0, ERR_NO_MEM };
+00002 enum errorcode _stp_error = ERR_NONE;
+00003 
+00012 inline void *_stp_alloc(size_t len)
+00013 {
+00014         void *ptr = kmalloc(len, GFP_ATOMIC);
+00015         if (ptr == NULL)
+00016                 _stp_error = ERR_NO_MEM;
+00017         return ptr;
+00018 }
+00019 
+00028 inline void *_stp_calloc(size_t len)
+00029 {
+00030         void *ptr = _stp_alloc(len);
+00031         if (ptr)
+00032                 memset(ptr, 0, len);
+00033         return ptr;
+00034 }
+00035 
+00043 inline void *_stp_valloc(size_t len)
+00044 {
+00045         void *ptr = vmalloc(len);
+00046         if (ptr)
+00047                 memset(ptr, 0, len);
+00048         else
+00049                 _stp_error = ERR_NO_MEM;
+00050         return ptr;
+00051 }
+00052 
+00057 inline void _stp_free(void *ptr)
+00058 {
+00059         if (ptr)
+00060                 kfree(ptr);
+00061 }
+00062 
+00067 inline void _stp_vfree(void *ptr)
+00068 {
+00069         if (ptr)
+00070                 vfree(ptr);
+00071 }
+

Generated on Wed Mar 9 13:21:28 2005 for SystemTap by  + +doxygen 1.3.9.1
+ + -- cgit