hi, im trying to execute printenv by writing:
execl("/opt/gnu/bin/printenv", Null);
but this doesnt work, is the code wrong or is the path wrong? (maybe it depends on system but how do find...
Type: Posts; User: mattholm
hi, im trying to execute printenv by writing:
execl("/opt/gnu/bin/printenv", Null);
but this doesnt work, is the code wrong or is the path wrong? (maybe it depends on system but how do find...
Thank you!!! it should be + sizeof(Header);
thanks alot! :)
I was hoping this line
oldsize = ((Header *)oldp - 1)->s.size * sizeof(Header);
would make the oldp point to the header
the malloc first-fit and free part is from a book (so I will only write realloc and worst and bestfit for malloc) and the Header comes from this:
typedef long Align; /*for alignment to long...
im writing a little library with malloc, realloc and free and then im gonna do some performance analysis and compare with the built in functions. any ideas of why i get segmentationsfaults?
hi can anyone tell me whats wrong with my realloc
I get segmentationfault when my testprogram does: p = realloc(p, 4711);
void *realloc(void *oldp, size_t size)
{
if (oldp == NULL){ ...
i have tried that and it didnt work. sorry for not saying so. if i put -pg in the end nothing happens (I get a new prompt but nothing more) and if I put it right after tstmalloc I get lots of errors...
in the many minutes that have passed i have learned how to use it on a single program but not how to do it with my 2 programs. (where in the command to put it) any ideas for how to do that?
the...
hi, i have written my own malloc and now I want to test it with a test program and use gprof to measure the performance.
my to programs are: malloc.c and tstmalloc.c.
how do i do this? I think it...
hi, can anyone tell me how to get around these problems?
the two problems is:
1. dereferencing "void *"-pointer
2. the value of the type void is not ignored, as it should.
/*realloc: change...
Thank you! :)
forgot to say I did a minor change to it but it just keeps printing out the number 1.
ok, this is all of my code, im working in ubuntu and compiling by writing "gcc -o 23 23.c" in the shell. i dont get any warnings but i dont know how to turn up the warning lvl.
thanks for helping...
hi, my waitpid is behaving really strange can u see what im dooing wrong?
(when my background processes are finished it prints out pid as 1 instead of the real pid and it never does the else part)
...
thank you very much!
hi, i think something is wrong with my strcmp since i never get the output "exiting" even if i write "exit"
#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 200
#include <sys/types.h>...
Thanks!
hi, i want to be able to type in "ls" but I need to type in "ls ls" to make it happen. what am I doing wrong?
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include...
hi, im trying to read input from the user with fgets for example "ls" then use execvp to make the command happen but when i try it nothing happens. what am i missing?
#include <sys/types.h>...