Struct on GPU

Hi
I want to know how can we copy a struct from cpu to gpu. For example

struct g_type{
int a;
int *b
int *c;
}
then I have
g_type *g; //on CPU

g->a=5;
g->b= (int*) malloc(5sizeof(int);
…fill a
g->c= (int
) malloc (7*sizeof(int);
…fill c

now I want to copy this struct from cpu to GPU. Please guide me.
Thanks

Here’s an example:
[url]cuda - How to use cudaMalloc / cudaMemcpy for a pointer to a structure containing pointers? - Stack Overflow