malloc, DICE and IPC
tjpj at lasige.di.fc.ul.pt
Wed Mar 30 16:30:17 CEST 2005
> That's strange. What version of dice are you using? With the above
> code it should not pagefault, but instead jump into the kernel-debugger.
thanks for your answers. Don't panic...:). When i say its page faulting
its AFTER entering the kernel debugger.
> Ok. You are using the default environment, which contains function
> pointers to malloc and free functions to allocate memory for such
> things as string returned from the server. These functions are (in old
> versions of dice set to NULL -> pagefault) or a default function (in
> the latest version), which jumps into the kernel debugger (to allow to
> see why its pagefaulting :).
> If you turn on warnings when using dice (-Wall or see --help for other
> options) it tells you when and for which variable it uses malloc. The
> idea is, that you can provide your own versions of malloc and free
> (just have to have the same signature) and set them in the local
> CORBA_Environment env = dice_default_environment;
> env.malloc = (dice_malloc)malloc;
> The cast is to eliminate a warning: the libc malloc usually uses
> size_t type, which is not defined in L4Env.
i'm gonna try it right now.
> Hope that helps,
thanks again :)
More information about the l4-hackers