Exemplo n.º 1
0
int main()
{

    measure_memory();
//    measure_read_file();

    return;

    pid_t pid = fork();
    if (pid==0) // start receiver for child
    {
        printf("starting receiver");
        start_receiver();
    }else if (pid<0)
    {
        printf("failed to fork");
        exit(1);
    }else
    {
        sleep(2);
        measure_signalling();
        //	measure_kernel_call();
        //      measure_read_file();
    }
    return 0;
}
Exemplo n.º 2
0
/* call-seq:
   measure_process_time -> float

Returns the process time.*/
static VALUE
prof_measure_memory(VALUE self)
{
    return rb_float_new(measure_memory());
}