VirtualBox

Changeset 16915 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Feb 18, 2009 3:42:19 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43039
Message:

crOpenGL: use chromium functions for malloc/free

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/list.c

    r16912 r16915  
    11#include "cr_list.h"
    22#include "cr_error.h"
     3#include "cr_mem.h"
     4
     5#if CR_TESTING_LIST
    36#include <stdio.h>
    47#include <stdlib.h>
    58#include <string.h>
     9#endif
    610
    711struct CRListIterator {
     
    1923CRList *crAllocList( void )
    2024{
    21         CRList *l = malloc( sizeof( CRList ) );
     25        CRList *l = crAlloc( sizeof( CRList ) );
    2226        CRASSERT( l );
    2327
    24         l->head = malloc( sizeof( CRListIterator ) );
     28        l->head = crAlloc( sizeof( CRListIterator ) );
    2529        CRASSERT( l->head );
    2630
    27         l->tail = malloc( sizeof( CRListIterator ) );
     31        l->tail = crAlloc( sizeof( CRListIterator ) );
    2832        CRASSERT( l->tail );
    2933
     
    5256                t2->next = NULL;
    5357                t2->element = NULL;
    54                 free( t2 );
     58                crFree( t2 );
    5559        }
    5660        l->size = 0;
    57         free( l );
     61        crFree( l );
    5862}
    5963
     
    7781        CRASSERT( iter != l->head );
    7882
    79         p = malloc( sizeof( CRListIterator ) );
     83        p = crAlloc( sizeof( CRListIterator ) );
    8084        CRASSERT( p != NULL );
    8185        p->prev = iter->prev;
     
    102106        iter->next = NULL;
    103107        iter->element = NULL;
    104         free( iter );
     108        crFree( iter );
    105109
    106110        l->size--;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette