aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-07 00:25:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-07 00:25:02 +1000
commit585191310bb476deb7bdd4214adcc8b1076c9fd4 (patch)
treed3d9391e592b04fc1cb7a4e7ecbac4c66f9b4a92 /proc.c
parent530bbfc9ac3234149a939c65da3d448279bf7de9 (diff)
First checkin of transition to using a new hierarchical memory allocator, some of the memory associated with a job is covered
darcs-hash:20060206142502-ac50b-ba1c9a4f64ea0f44f65303a125f9ddae5bd31e2f.gz
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/proc.c b/proc.c
index abfcbeb5..5769ba14 100644
--- a/proc.c
+++ b/proc.c
@@ -119,8 +119,6 @@ static void free_process( process_t *p )
if( p==0 )
return;
-
-
free_process( p->next );
free( p->actual_cmd );
if( p->argv != 0 )
@@ -131,7 +129,6 @@ static void free_process( process_t *p )
}
free(p->argv );
}
- free( p );
}
/**
@@ -176,21 +173,7 @@ void job_free( job_t * j )
/* Then free ourselves */
free_process( j->first_process);
- if( j->command != 0 )
- free( j->command );
-
- for( io=j->io; io; io=ionext )
- {
- ionext = io->next;
-// fwprintf( stderr, L"Kill redirect %d of type %d\n", ionext, io->io_mode );
- if( io->io_mode == IO_FILE )
- {
- free( io->param1.filename );
- }
- free( io );
- }
-
- free( j );
+ halloc_free( j );
}
void proc_destroy()
@@ -223,7 +206,7 @@ job_t *job_create()
while( job_get( free_id ) != 0 )
free_id++;
- res = calloc( 1, sizeof(job_t) );
+ res = halloc( 0, sizeof(job_t) );
res->next = first_job;
res->job_id = free_id;
first_job = res;