Thanks..
"Bertel Lund Hansen" <nospamto@lundhansen.dk> wrote in message
news:tojfftg23ra2e1vphb64blpd8esmenugk1@sunsite.auc.dk...
> holst skrev:
>
> >md = (struct mailbox_data *)malloc(sizeof(struct mailbox_data),KERNEL);
>
> >Problem understanding the malloc() funktion. Can it really take two
> >parametres?
>
> Not in ANSI-C. It might be a local function written inside the
> code.
>
> >And what about the pointer - what does it point to?
>
> When using malloc (the standard C-function), a chunk of memory is
> reserved and the pointer, here md, will point to the (first byte
> of the) chunk.
>
> The parenthesis, (struct mailbox_data *), is a typecast that
> makes sure that md is not just any pointer but a pointer to a
> specific type. That will be important later in the program.
>
> --
> Bertel
>
http://lundhansen.dk/bertel/ FIDUSO:
http://fiduso.dk/