explain malloc and other  dynamic memory allocation functions?
483878
Refer to some site dood ... type "difference between difference alloc statements in C" in Y! Search
898314
Here are some general data structures:\n\n- Set\n- List\n- Map\n- Tree\n- Table\n- Stack\n- Queue
574694
In paging, pages of a size keep moving in and out of the memory according to demand( if you are using demand paging)... But the user view of a memory is hardly like that(progrms divided into pages... few people will buy that). So we use paging with segmentation which allows us to employ the view we have had of memory... of it being segmented in code,global variables,parameters etc. So a page eventually does not belong to a process but a segment of a process... one more advantage is that we can further exploit the locality of reference property of programs.
654224
#ifndef QUEUE_H_\n#define QUEUE_H_\nFile: queue.h\ntypdef item_t int;\nstruct Queue  {\n   item_t contents;\n   Queue* next;\n};\n\n/* Public Interface */\n/* Adds a new item to the end of the queue */\nvoid enqueue(item_t datum, Queue* head);\n/* Removes the head of the queue. */\nQueue* dequeue( Queue* head );\n/* Returns the element at the top of the queue */\nitem_t* top(Queue* head); \n#endif\n--------\n\nFile: Queue.c\n\nvoid enqueue(item_t datum, Queue* current){\n      if (current == NULL){ \n           current = malloc(sizeof(Queue));\n           current->contents = dataum;\n           current->next = NULL;\n           return;\n       }\n      while (current->next != NULL){\n         current = current->next;\n      }\n      current->next = malloc(sizeof(Queue));\n      current->next->contents = datum;\n      current->next->next = NULL;\n      return;\n  }\nQueue* dequeue(Queue* head){\n   if (head == NULL){ return head;}\n   Queue* trash = head;\n   head = head->next;\n   free(trash);\n   trash = NULL;\n   return head;\n}\n\nitem_t* top(Queue* head){\n   if (head == NULL){ return NULL; }\n   else {\n      return &head->contents;\n  }\n}
628097
Imagine a block of memory from 0 to N. A cyclic buffer fills from 0 towards N, and when it reaches N it starts back at 0 again.\nThis kind of buffer needs to be "serviced" (have the data removed) before new data overwrites data that hasn't been removed yet.\nThere is normally an "in" pointer for incoming data, and an "out" pointer for outgoing data, If the "out" pointer reaches the "in" pointer, the buffer is empty again. If the "in" pointer reaches the "out" pointer, you've overflowed the cyclic buffer!
258111
It's a resource file for a program. In programming you try to reuse code as much as possible . . . in essence you make small machines that you can reuse, these small machines then form a larger machine (your program). Dynamically Linked Libraries (.DLL) reuse existing code in the Operating System or you can make your own for a special use. Below is a link to wikipedia . . . it's a okay place to start your research\n\n"In computer science, a Dynamic Library, also referred to as a Dynamically Linked Library, is a computer library that implements the concept of dynamic linking."
777982
make sure 'a' is defined as a pointer to another variable you've declared. like:\n\n int b = 1;\n int* a = &b;\n\nOtherwise, if you simply declare \n  int* a;\n  *a = 1;\n\n..then you have reserved memory for an address, but not for the contents.  'a' is pointing to a pseudo-random place in memory.\n\n Secondly, printf() of 'a' should return the address you've reserved.  printf() of '*a' should return the 1 as you're expecting.  The most likely reason you're not seeing this is because 'a' is set to (1) - which means it is not a valid pointer.  This can be caused by some compilers in a DEBUG build when a variable goes out of scope.  As in:\n\n  int* a;\n {\n    int b = 1;\n    a = &b;\n  }\n  // 'b' is now out of scope - some compilers will change memory to indicate this during a debug build.  *a is now (0) !\n\n Hope that helps.
408732
To use the input the way you want... you have know how the c compiler gets the input... all output and input are first transferred from the i&#92;o device to a stream...so the input is  stored in a stream and the program gets its input from this stream...so if the user gives two chars as input... its stored in the stream... and after the program gets a char from the stream...the next char which is in the stream is taken as the next input... to avoid this you can use the function fflush();... this funtion erases the stream...
361052
64-bit memory chip\n\n=D
511316
Hai buddy\n\nRandom Access Memory which is widely known as RAM is memory cells which can be accessed for information transfer from any desired random location ,thus the name RAM.In simple words it is the storage unit to store your temporary information,you can store the data and retrieve too\n\nwhile\n\nRead Only Memory or ROM is a memory unit that performs the read operation only,it does not have a write capability and you cant modify any of the information stored in ROM
740430
You are you using a a pointer and an array while passing a variable to a function called Point. I'm not quite sure what you are trying to point to, but you are copying the heap.
765091
Mn is close, but there are 2 errors:\n\n1) There is no len() function.  Use strlen() instead of len().\n\n2) He didn't allocate enough memory for the sprintf to fit the entire result string in the buffer.  The line needs room to store the &#92;n (or in windows, 2 chars - cr and lf ) in addition to the null terminator.  So, his code needs to add 2 instead of 1 to the length calculation.  \n\nTaking this a little further, the number of chars should be multiplied by the sizeof(t_char), which MIGHT NOT be 1 byte if the code is destined to use unicode.\n\nChances are, this is ascii, so the multiplication is unnecessary, but it is better to be safe than sorry.  Besides, if this was production code, you'd want to be able to use the same code in both places without any need to change it.  Nothing worse than having to go back and recalculate buffer manipulation code during a port.\n\nThe above subtleties demonstrate precisely how and why it is so very easy to make a mistake in c/c++, leading to a buffer underallocation or overwrite, and hence a security hole.
168924
A buffer is just a contiguous piece of memory.  Most memory is allocated on the stack or the heap, and is normally managed by the system (or garbage collector) in a linked-list format.\n\nAny more detail would require more info about what language you are writing in and how you want to use it.
662885
No difference ,they are all used for dynamic allocation.only syntax difference i guess.
251936
haha i hear for the first time about sodium ram... what i know abt RAM types are:\n\nKinds of RAM\nRAM can be divided into (1) main RAM, which stores every kind of data and makes it quickly accessible to a microprocessor and (2) video RAM, which stores data intended for your display screen, enabling images to get to your display faster. \nMain RAM\nMain RAM can be divided into static RAM (SRAM) and dynamic RAM (DRAM). \n\nStatic RAM (SRAM)\nStatic RAM is more expensive, requires four times the amount of space for a given amount of data than dynamic RAM, but, unlike dynamic RAM, does not need to be power-refreshed and is therefore faster to access. One source gives a typical access time as 25 nanoseconds in contrast to a typical access time of 60 nanoseconds for dynamic RAM. (More recent advances in dynamic RAM have improved access time.) Static RAM is used mainly for the level-1 and level-2 caches that the microprocessor looks in first before looking in dynamic RAM. \nBurst (or SynchBurst) Static RAM (BSRAM)\nBurst SRAM (also known as SynchBurst SRAM) is synchronized with the system clock or, in some cases, the cache bus clock. This allows it be more easily synchronized with any device that accesses it and reduces access waiting time. It is used as the external level-2 cache memory for the Pentium II microprocessor chipset. \nDynamic RAM (DRAM)\nDynamic RAM uses a kind of capacitor that needs frequent power refreshing to retain its charge. Because reading a DRAM discharges its contents, a power refresh is required after each read. Apart from reading, just to maintain the charge that holds its content in place, DRAM must be refreshed about every 15 microseconds. DRAM is the least expensive kind of RAM. \nFast Page Mode DRAM (FPM DRAM)\nPrior to newer forms of DRAM, Fast Page Mode DRAM (FPM DRAM) was the most common kind of DRAM in personal computers. Page mode DRAM essentially accesses a row of RAM without having to continually respecify the row. A row access strobe (RAS) signal is held active while the column access strobe (CAS) signal changes to read a sequence of contiguous cells. This reduces access time and lowers power requirements. Clock timings for FPM DRAM are typically 6-3-3-3 (meaning 3 clock cycles for access setup, and 3 clock cycles for the first and each of three successive accesses based on the initial setup). \nEnhanced DRAM\nEnhanced DRAM (EDRAM) is the combination of SRAM and DRAM in a single package that is usually used for a level-2 cache. Typically, 256 bytes of static RAM is included along with the dynamic RAM. Data is read first from the faster (typically 15 nanoseconds) SRAM and if it is not found there, it is read from the DRAM, typically at 35 nanoseconds. \nExtended Data Output RAM or DRAM (EDO RAM or EDO DRAM)\nExtended Data Output RAM (EDO RAM) or Extended Data Output Dynamic RAM (EDO DRAM) is up to 25% faster than standard DRAM and reduces the need for level-2 cache memory. \nBurst Extended Data Output DRAM (BEDO DRAM)\nBEDO DRAM improves page mode DRAM by "building in" three successive column address shifts after the first column address is specified so that four bits are read as a burst. Together with a dual-bank architecture, BEDO DRAM promised to offer 4-1-1-1 access times. However, because Intel and other manufacturers preferred SDRAM, BEDO DRAM was not widely used. \nNonvolatile RAM (NVRAM)\nNonvolatile RAM (NVRAM) is a special kind of RAM that retains data when the computer is turned off or there is a power failure. Like the computer's read-only memory (ROM), it is powered by a battery within the computer. It can also work by writing its contents to and restoring them from an EEPROM. \nSynchronous DRAM (SDRAM)\nSynchronous DRAM (SDRAM) is a generic name for various kinds of DRAM that are synchronized with the clock speed that the microprocessor is optimized for. This tends to increase the number of instructions that the processor can perform in a given time. The speed of SDRAM
935645
main() { static char *a="n0body"; char b[512],*c,*d;\n  while (c=gets(a)) for (d=a;c;*c^=*d,c++,d=*++d?d:a);\n  printf ("%s&#92;n",b);}\n\n\nhappy?
692205
its possibile to change data in address locations outside of the scope of the variable.\nexample:\n\nint a;\nint *p;\n\nint a = 2;\np = &a; //get address of a\np++;    //inc pointer\n*p = 5; //load address with 5\nwhere is p pointing to? not a, so we just over wrote some other address that may contain other data.