Search Results

Search found 3 results on 1 pages for 'mahatma'.

Page 1/1 | 1 

  • Memory allocation patterns in C++

    - by Mahatma
    I am confused about the memory allocation in C++ in terms of the memory areas such as Const data area, Stack, Heap, Freestore, Heap and Global/Static area. I would like to understand the memory allocation pattern in the following snippet. Can anyone help me to understand this. If there any thing more apart from the variable types mentioned in the example to help understand the concept better please alter the example. class FooBar { int n; //Stored in stack? public: int pubVar; //stored in stack? void foo(int param) //param stored in stack { int *pp = new int; //int is allocated on heap. n = param; static int nStat; //Stored in static area of memory int nLoc; //stored in stack? string str = "mystring"; //stored in stack? .. if(CONDITION) { static int nSIf; //stored in static area of memory int loopvar; //stored in stack .. } } } int main(int) { Foobar bar; //bar stored in stack? or a part of it? Foobar *pBar; //pBar is stored in stack pBar = new Foobar(); //the object is created in heap? What part of the object is stored on heap } EDIT: What confuses me is, if pBar = new Foobar(); stores the object on the heap, how come int nLoc; and int pubVar;, that are components of the object stored on stack? Sounds contradictory to me. Shouldn't the lifetime of pubvar and pBar be the same?

    Read the article

  • Book Giveaway: We Have 10 Free Copies of the 4-Hour Chef (The Simple Path to Cooking Like a Pro, Learning Anything, and Living the Good Life)

    - by The Geek
    The 4-Hour Chef isn’t just a cookbook. It’s a choose-your-own-adventure guide to the world of rapid learning from the best-selling author of the 4-Hour Workweek, and we’ve got 10 free copies for How-To Geek readers. Want more information? Here’s the description of the book, from the Amazon page. The 4-Hour Chef is a five-stop journey through the art and science of learning: 1. META-LEARNING. Before you learn to cook, you must learn to learn. META charts the path to doubling your learning potential. 2. THE DOMESTIC. DOM is where you learn the building blocks of cooking. These are the ABCs (techniques) that can take you from Dr, Seuss to Shakespeare. 3. THE WILD. Becoming a master student requires self-sufficiency in all things. WILD teaches you to hunt, forage, and survive. 4. THE SCIENTIST. SCI is the mad scientist and modernist painter wrapped into one. This is where you rediscover whimsy and wonder. 5. THE PROFESSIONAL. Swaraj, a term usually associated with Mahatma Gandhi, can be translated as “self-rule.” In PRO, we’ll look at how the best in the world become the best in the world, and how you can chart your own path far beyond this book. Still not sold? There’s more information and pictures over on the Amazon page for the book. The 4-Hour Chef: The Simple Path to Cooking Like a Pro, Learning Anything, and Living the Good Life Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows HTG Explains: Why Screen Savers Are No Longer Necessary

    Read the article

  • SQL Saturday and Exploring Data Privacy

    - by Johnm
    I have been highly impressed with the growth of the SQL Saturday phenomenon. It seems that an announcement for a new wonderful event finds its way to my inbox on a daily basis. I have had the opportunity to attend the first of the SQL Saturday's for Tampa, Chicago, Louisville and recently my home town of Indianapolis. It is my hope that there will be many more in my future. This past weekend I had the honor of being selected to speak amid a great line up of speakers at SQL Saturday #82 in Indianapolis. My session topic/title was "Exploring Data Privacy". Below is a brief synopsis of my session: Data Privacy in a Nutshell        - Definition of data privacy        - Examples of personally identifiable data        - Examples of Sensitive data Laws and Stuff        - Various examples of laws, regulations and policies that influence the definition of data privacy        - General rules of thumb that encompasses most laws Your Data Footprint        - Who has personal information about you?        - What are you exchanging data privacy for?        - The amazing resilience of data        - The cost of data loss Weapons of Mass Protection       - Data classification       - Extended properties       - Database Object Schemas       - An extraordinarily brief introduction of encryption       - The amazing data professional  <-the most important point of the entire session! The subject of data privacy is one that is quickly making its way to the forefront of the mind of many data professionals. Somewhere out there someone is storing personally identifiable and other sensitive data about you. In some cases it is kept reasonably secure. In other cases it is kept in total exposure without the consideration of its potential of damage to you. Who has access to it and how is it being used? Are we being unnecessarily required to supply sensitive data in exchange for products and services? These are just a few questions on everyone's mind. As data loss events of grand scale hit the headlines in a more frequent succession, the level of frustration and urgency for a solution increases. I assembled this session with the intent to raise awareness of sensitive data and remind us all that we, data professionals, are the ones who have the greatest impact and influence on how sensitive data is regarded and protected. Mahatma Gandhi once said "Be the change you want to see in the world." This is guidance that I keep near to my heart as I approached this topic of data privacy.

    Read the article

1