develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35357 - in branches/pdd09gc_part2: include/parrot src

From:
chromatic
Date:
January 10, 2009 14:00
Subject:
[svn:parrot] r35357 - in branches/pdd09gc_part2: include/parrot src
Message ID:
20090110220017.40BF7CB9F9@x12.develooper.com
Author: chromatic
Date: Sat Jan 10 14:00:16 2009
New Revision: 35357

Modified:
   branches/pdd09gc_part2/include/parrot/headers.h
   branches/pdd09gc_part2/src/headers.c

Log:
[src] Removed doomed get_bufferlike_pool() function, which could cause memory
corruption from innocent-looking use.  What replaces it?  Oh, you'll see....


Modified: branches/pdd09gc_part2/include/parrot/headers.h
==============================================================================
--- branches/pdd09gc_part2/include/parrot/headers.h	(original)
+++ branches/pdd09gc_part2/include/parrot/headers.h	Sat Jan 10 14:00:16 2009
@@ -1,5 +1,5 @@
 /* headers.h
- *  Copyright (C) 2001-2003, The Perl Foundation.
+ *  Copyright (C) 2001-2009, The Perl Foundation.
  *  SVN Info
  *     $Id$
  *  Overview:
@@ -59,11 +59,6 @@
         FUNC_MODIFIES(*pmc);
 
 PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Small_Object_Pool * get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
-        __attribute__nonnull__(1);
-
-PARROT_WARN_UNUSED_RESULT
 size_t get_max_buffer_address(PARROT_INTERP)
         __attribute__nonnull__(1);
 

Modified: branches/pdd09gc_part2/src/headers.c
==============================================================================
--- branches/pdd09gc_part2/src/headers.c	(original)
+++ branches/pdd09gc_part2/src/headers.c	Sat Jan 10 14:00:16 2009
@@ -302,31 +302,6 @@
 
 /*
 
-=item C<Small_Object_Pool * get_bufferlike_pool>
-
-Returns a bufferlike header pool for objects of a given size. Does not check to
-see if the pool already exists, so if the pool does not exist, this will return
-an invalid pointer.  That's bad.  Don't use this until it gets fixed.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-Small_Object_Pool *
-get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
-{
-    ASSERT_ARGS(get_bufferlike_pool)
-    Small_Object_Pool ** const sized_pools =
-            interp->arena_base->sized_header_pools;
-
-    return sized_pools[ (buffer_size - sizeof (Buffer)) / sizeof (void *) ];
-}
-
-
-/*
-
 =item C<PMC * new_pmc_header>
 
 Gets a new PMC header from the PMC pool's free list. Guaranteed to return a



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About