]> sourceware.org Git - systemtap.git/commitdiff
2005-12-02 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Fri, 2 Dec 2005 17:41:56 +0000 (17:41 +0000)
committerhunt <hunt>
Fri, 2 Dec 2005 17:41:56 +0000 (17:41 +0000)
* procfs.c (_stp_set_buffers): kmalloc the buffers instead
of vmalloc.
(_stp_register_procfs): Ditto.
(_stp_unregister_procfs): kfree the buffers.

runtime/transport/ChangeLog
runtime/transport/procfs.c

index 4353fb934c1490d7e6de28723191a4545ffc3dad..677a22ab994c9d7f6ccb15aa9e9c2d288037f0cc 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-02  Martin Hunt  <hunt@redhat.com>
+
+       * procfs.c (_stp_set_buffers): kmalloc the buffers instead
+       of vmalloc.
+       (_stp_register_procfs): Ditto.
+       (_stp_unregister_procfs): kfree the buffers.
+
 2005-11-30  Martin Hunt  <hunt@redhat.com>
 
        * transport.h (STP_WORK_TIMER): Declare.
index 7db6e658226a065d4b54dae4844d9652abddae58..7818c4913e1ff73ca78f46f118a0c896476c9d7c 100644 (file)
@@ -237,7 +237,7 @@ static int _stp_set_buffers(int num)
        spin_lock(&_stp_pool_lock);
        if (num > _stp_current_buffers) {
                for (i = 0; i < num - _stp_current_buffers; i++) {
-                       p = (struct list_head *)vmalloc(sizeof(struct _stp_buffer));
+                       p = (struct list_head *)kmalloc(sizeof(struct _stp_buffer),GFP_KERNEL);
                        if (!p) {
                                _stp_current_buffers += i;
                                goto err;
@@ -248,7 +248,7 @@ static int _stp_set_buffers(int num)
                for (i = 0; i < _stp_current_buffers - num; i++) {
                        p = _stp_pool_q.next;
                        list_del(p);
-                       vfree(p);
+                       kfree(p);
                }
        }
        _stp_current_buffers = num;
@@ -273,7 +273,7 @@ static int _stp_register_procfs (void)
 
        /* allocate buffers */
        for (i = 0; i < STP_DEFAULT_BUFFERS; i++) {
-               p = (struct list_head *)vmalloc(sizeof(struct _stp_buffer));
+               p = (struct list_head *)kmalloc(sizeof(struct _stp_buffer),GFP_KERNEL);
                // printk("allocated buffer at %lx\n", (long)p);
                if (!p)
                        goto err2;
@@ -328,7 +328,7 @@ static int _stp_register_procfs (void)
 err2:
        list_for_each_safe(p, tmp, &_stp_pool_q) {
                list_del(p);
-               vfree(p);
+               kfree(p);
        }
 
 err1:
@@ -372,11 +372,11 @@ static void _stp_unregister_procfs (void)
        /* free memory pools */
        list_for_each_safe(p, tmp, &_stp_pool_q) {
                list_del(p);
-               vfree(p);
+               kfree(p);
        }
        list_for_each_safe(p, tmp, &_stp_ready_q) {
                list_del(p);
-               vfree(p);
+               kfree(p);
        }
 }
 
This page took 0.02984 seconds and 5 git commands to generate.