10-21-2005
thanks for that ..
What I was thinking was how well can a programmer organize himself for making optimal use of stack and memory.
For example declaring unused variables, passing huge arguments to the function and repeated malloc ( where a static variable can be used ) are not recommonded.
Similar to this, do we have some set of issues related with memory management that a programmer tend to overlook.
What I have observered is that people ( including me) have superficial idea about the memory layout and make a simple task on user side, very difficult on system side and do not realize the impact.
Regards,
Parasa Kiran
8 More Discussions You Might Find Interesting
1. Red Hat
What's the best way to find out how much memory is being used/available? I tried using free, but I didn't quite understand the output. Can someone explain it?
$ free
total used free shared buffers cached
Mem: 16304536 16256376 48160 0 ... (6 Replies)
Discussion started by: junkmail426
6 Replies
2. UNIX for Advanced & Expert Users
Hi,
I having problem with my linux machine
it have 6Gb physical memory and somehow it always almost coming to the bottom neck and than it start writing to the swap memory
you can see that there is more than 4G in cahce, is there any way to clean the cache or to limit it to 2Gb?
host1... (6 Replies)
Discussion started by: Igal Malka
6 Replies
3. Linux
Hi
I have Fedora linux with XFCE desktop. I want to use Indic lanquage in that. I have installed unicode devnagri fonts. But I am not able to change my default keyboard layout. How can I change default keyboard layout in XFCE or through command line.
Thanks
NeeleshG (0 Replies)
Discussion started by: neel.gurjar
0 Replies
4. Red Hat
how to list the orphaned shared memory?
how to kill them so that shared mem is free again.
thanks (9 Replies)
Discussion started by: melanie_pfefer
9 Replies
5. Linux
Hi All,
We are using the linux servers and need to track the memory utilization of the box. Could anyone advice how the same can be achived.
:) (1 Reply)
Discussion started by: haitorajesh
1 Replies
6. Programming
I am trying to create an application that will be able to sniff memory of other applications.
I am not completely new to systems programming but I am not sure how to go about this task. I understand that accomplishing this mainly require these steps.
1: Get a list of processes
2: Find the... (2 Replies)
Discussion started by: mosey
2 Replies
7. Red Hat
Hello, I am using Linux os.
$ df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 2023256 1065000 958256 53% /dev/shm
$
Based on my google this, it is shared memory. What is this shared memory and where exactly it is used? Can you... (5 Replies)
Discussion started by: govindts
5 Replies
8. Programming
In the following code, why the final result of "usC=cA+(char)ucB;" is 0xFF00?
In my opioion the memory layout of cA is "10000000" and
(char)cB is "10000000",usC type is unsigned short ,so the result should be "100000000" ,the 0x100.
Please help tell me what is wrong? Thanks!!;)
... (2 Replies)
Discussion started by: micky.zhou
2 Replies
LEARN ABOUT DEBIAN
tiffmemory
MEMORY(3TIFF) MEMORY(3TIFF)
NAME
_TIFFmalloc, _TIFFrealloc, _TIFFfree, _TIFFmemset, _TIFFmemcpy, _TIFFmemcmp, - memory management-related functions for use with TIFF files
SYNOPSIS
#include <tiffio.h>
tdata_t _TIFFmalloc(tsize_t size);
tdata_t _TIFFrealloc(tdata_t buffer, tsize_t size);
void _TIFFfree(tdata_t buffer);
void _TIFFmemset(tdata_t s, int c, tsize_t n);
void _TIFFmemcpy(tdata_t dest, const tdata_t src, tsize_t n);
int _TIFFmemcmp(const tdata_t s1, const tdata_t s2, tsize_t n);
DESCRIPTION
These routines are provided for writing portable software that uses libtiff; they hide any memory-management related issues, such as deal-
ing with segmented architectures found on 16-bit machines.
_TIFFmalloc and _TIFFrealloc are used to dynamically allocate and reallocate memory used by libtiff; such as memory passed into the I/O
routines. Memory allocated through these interfaces is released back to the system using the _TIFFfree routine.
Memory allocated through one of the above interfaces can be set to a known value using _TIFFmemset, copied to another memory location using
_TIFFmemcpy, or compared for equality using _TIFFmemcmp. These routines conform to the equivalent ANSI C routines: memset, memcpy, and
memcmp, repsectively.
DIAGNOSTICS
None.
SEE ALSO
malloc(3), memory(3), libtiff(3TIFF)
Libtiff library home page: http://www.remotesensing.org/libtiff/
libtiff October 15, 1995 MEMORY(3TIFF)