util.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include "util.h"

Go to the source code of this file.

Defines

#define _GNU_SOURCE

Functions

void sat_oom (size_t num, size_t len)
void * sat_malloc (size_t len)
 malloc exits with error message on error
void * sat_malloc2 (size_t num, size_t len)
void * sat_realloc (void *old, size_t len)
void * sat_realloc2 (void *old, size_t num, size_t len)
void * sat_calloc (size_t num, size_t len)
void * sat_free (void *mem)
unsigned int sat_timems (unsigned int subtract)
void sat_sort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *compard)
char * sat_dupjoin (const char *str1, const char *str2, const char *str3)

Define Documentation

#define _GNU_SOURCE

Definition at line 8 of file util.c.


Function Documentation

void sat_oom ( size_t  num,
size_t  len 
)

Definition at line 19 of file util.c.

Referenced by sat_calloc(), sat_malloc(), sat_malloc2(), sat_realloc(), and sat_realloc2().

void* sat_malloc ( size_t  len  ) 

malloc exits with error message on error

Definition at line 30 of file util.c.

References sat_oom().

Referenced by map_init_clone(), pool_addfileprovides_dep(), pool_id2langid(), repo_add_solv_flags(), sat_dupjoin(), and sat_malloc2().

void* sat_malloc2 ( size_t  num,
size_t  len 
)
void* sat_realloc ( void *  old,
size_t  len 
)
void* sat_realloc2 ( void *  old,
size_t  num,
size_t  len 
)
void* sat_calloc ( size_t  num,
size_t  len 
)
void* sat_free ( void *  mem  ) 
unsigned int sat_timems ( unsigned int  subtract  ) 
void sat_sort ( void *  base,
size_t  nmemb,
size_t  size,
int(*)(const void *, const void *, void *)  compar,
void *  compard 
)
char* sat_dupjoin ( const char *  str1,
const char *  str2,
const char *  str3 
)

Definition at line 122 of file util.c.

References sat_malloc().

Generated on Mon Dec 12 11:44:13 2011 for satsolver by  doxygen 1.6.3