Hi all,
I need to dynamic create space for these structure and store the hash entries and datas.
typedef struct abc{
hash_t *table;
} gInfoDB;
typedef struct xyz{
gInfoDB *ctDB;
} InfoDB;
InfoDB[10000];
I have 10000 of InfoDB array in which the ctDB is malloced dynamically and store the contents of the files in
the hash table.
My question is:
1.The shared memory with which we get a chunk of memory. Can we further malloc and store
the data's given by the shared memory. or we need to create keys and
shared memory for every arrays.
I have tried for arrays of structure and its works fine. But i was not able to do this.
struct check {
int *datum;
} *strucSup;
Here i was trying to malloc the datum and was able to store the data but getting segFault when tring through some other process. I can use further shmget the datum pointer but i don't want to do because this may create so many shared memory in my systems.
Is there any work around to do this.
Please guide me with the coding if you get.
Thanks in advance,