We need Linux kernel programmers

C programmer, Linux kernel, know how to program, know how to _learn_

know hardware, basic electronic

attractive salary (later on, ask my HRD manager)

Willing to work in Jakarta, Indonesia

send me an email : dsasongko + _at_ + mobiztech.com

Tired

So tired, wake up at 5:46, go to train station at 7:12, waiting for the train until 7:42, on the train until 8:31, walking to the office for 10 minutes, in the office until 9:52 PM, (supposed to be) go home, on the way for two hours, get supper, take a bath, (try to) sleep at 2:04.

my friend just ask me : “how much you’re paid ?”

i answer : “not much as you are”

malloc vs free

this is very funny and interesting :

write this code :

main()
{
    int *p1 = malloc(sizeof(int));
    *p1 = 3;
    printf("%d, %p\n", *p1, p1);
    free(p1);
    printf("%d, %p\n", *p1, p1);
}

i expect that in the second printf, i will get Segmentation fault. I assumed that when the pointer p1 is free‘d it will be NULL, destroyed. In fact, the memory still exist but the content is null.

ruckuus@ruckuux:~/Code$ ./p
3 0x804a008
0 0x804a008

A little thing that leads me to here :

MALLOC(3)                    Linux Programmer’s Manual                           MALLOC(3)
NAME
       calloc, malloc, free, realloc - Allocate and free dynamic memory
SYNOPSIS
       #include <stdlib.h>
       void *calloc(size_t nmemb, size_t size);
       void *malloc(size_t size);
       void free(void *ptr);
       void *realloc(void *ptr, size_t size);

see, void free (void *ptr) ? what does it mean ?

free()  frees the memory space pointed to by ptr, which must have been returned by
a previous call to malloc(), calloc() or realloc(). Otherwise, or if free(ptr) has
already been called before, undefined behavior occurs. If ptr is NULL, no operation
is performed.

free will never delete / free “memory space” pointed by ptr. but yes it will delete it’s content. Did i miss something here ?

this will be different if the code look like this :

main()
{
    int *p1 = malloc(sizeof(int));
    *p1 = 3;
    printf("%d, %p\n", *p1, p1);
    free(p1);
    p1 = 0;
    printf("%d, %p\n", *p1, p1);
}

Correctly this is forbidden, accessing NULL :

ruckuus@ruckuux:~/Code$ ./p
3 0x804a008
Segmentation fault

This might be a reminder, if i’m _not_wrong_, very long time ago with the first code i got Seg fault because as i remember free will destroy the pointer and it’s memory space is unusable anymore. So, is this a reminder that i might have been wrong for very long time in case of free pointer ?

Money, again

The problem is that i don’t have _money_ to buy (*phone) reload voucher. That’s it.

Jealousy

Q : If you understood that jealousy is not good for your health, why do you still feel that kind of shit ?

A : it happens, always like that

Q : why ?

A : you ask wrong question, it supposed to be “what ?”

Lo**

Sometimes, love can be defined as a bunch of photos taken from spontaneous time.

so, why do bother ? it happened and will always happen.

love is unshared, albeit the littlest part of it. Love comes spontaneously, just like hatred. That’s why scorpion write songs titled When Love Kills Love

Don’t play words

  1. it’s confusing
  2. it raises assumption, and it’s bad
  3. it wastes your time and your reader’s time

Top Posting

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

taken from here

Mission Accomplished

This might be …

the end of our trip, mission accomplished. Mission to bring a new you, not totally new, and actually nothing. You have already had those miracles, but somehow they have never shown before. Born incomplete, and now you’re completed.

I’m glad to know that.

Waiting, Wishing

Listening to your songs, smoking your cigarette, accompanied by your pictures, i was asking to myself, what a perfect night ? without you. my girls are leaving me alone. my sister went to our home town for her holiday, and my girl went to Aceh for her carrier, and I wash my dress, eat, out, all by myself.

well, life always challenge us to choice, and whatever choice will always be the best, with it’s own risk and consequences surely. Don’t ever grumble nor sorry nor regret, it’s the way it should be. whatever will be is the way it should be. I wish the best for everything, even the best thing is still unknown. Consequently, those things are the best.