linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] In LVM, problem with memory allocation to a new data structure...
@ 2006-06-22 17:31 조완근
  0 siblings, 0 replies; only message in thread
From: 조완근 @ 2006-06-22 17:31 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]





In my work with LVM source code, I made a new data structure "struct 
extent" in lib/metadata/metadata.h file, and then I added new member variables 
in "struct physical_volume". One of the new 
member variables is a pointer variable to an array of "struct 
extent" objects. I got the memory allocated to the pointer by using just 
malloc() function.


 


The source is compiled without any errors. But in execution, when the new 
array of "struct extent" objects is allocated, it works well. But later, when I 
access the physical volume object again, the new members have all zeros, instead 
of the values I gave before. Where have the values gone??


 


My question is


 (1) How can I add new member variables in the metadata data 
structures?


 (2) and What do I have to use for memory allocation to 
the new variables?


 


I'm very happy that there are you guys who can answer to my questions. Thank 
you!!






[-- Attachment #2: Type: text/html, Size: 1506 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-22 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 17:31 [linux-lvm] In LVM, problem with memory allocation to a new data structure 조완근

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).