Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct Object { int i; };

void *malloc(unsigned long size);

int main() {
    struct Object *obj1 = malloc(sizeof(struct Object));
    struct Object *obj2 = malloc(sizeof(struct Object));
    if (!obj1 || !obj2) {
        return -1;
    }
    obj1->i = 10;
    obj2->i = 20;
    return 0;
}