Sponsored Content
Top Forums Programming how to round up a memory address(memory alignment problem) Post 84082 by nj302 on Wednesday 21st of September 2005 04:29:46 PM
Old 09-21-2005
Still I got same bus error. The problem is that the dev is not at the address where keybuff + s_docname is

Some processors are not able to load an integer, unsigned etc, from an address which is not a multiple of the size of that integer. For 4-byte integers, the address it is loaded from, looking at the lowest two bit only, must be 00. It is called 4-byte alignment.

I need to "round up" my s_docname by some suitable calculation, leaving what is called 'padding' between docname and dev.

I need some advice on how to round this up. Thanks a lot.
 

10 More Discussions You Might Find Interesting

1. Solaris

Memory Alignment Problem on Sun Sparcs

Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10. My code to marshal the... (1 Reply)
Discussion started by: nj302
1 Replies

2. Programming

Cannot access memory at address 0x8

Hi All I have a structure pointer and setting that pointer as NULL. When i tried to access the elements in the structure i am getting the error message. "Cannot access memory at address 0x8". This i tried in LINUX. When the same program is tried thro UNIX (HP-UX), i am not getting the message... (8 Replies)
Discussion started by: rkraj
8 Replies

3. Solaris

Error: Memory Address Not aligned

Hi, The following error message occured when I was trying to reboot my SUN machine: Memory address not aligned Its a Sun 280 R , Ultra SPARC III What should I do. Varma (3 Replies)
Discussion started by: gunnervarma
3 Replies

4. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

5. Solaris

restrcit physical memory with zone.max-locked-memory

Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies

6. UNIX for Dummies Questions & Answers

change the memory address of ld.linux-so in a dynamically linked process

hi, For some special reason , I'd like to control the memory address for the shared libraries in my dynamically linked process. And it is the "ld" which interpret the dynamically linked library, and in my system, the "ld-linux.so.2" is put at 0x00812000. Then I use "prelink -r" command to change... (0 Replies)
Discussion started by: zerocool_08
0 Replies

7. Linux

change the memory address of ld.linux-so in a dynamically linked process

hi, For some special reason , I'd like to control the memory address for the shared libraries in my dynamically linked process. And it is the "ld" which interpret the dynamically linked library, and in my system, the "ld-linux.so.2" is put at 0x00812000. Then I use "prelink -r" command to... (3 Replies)
Discussion started by: zerocool_08
3 Replies

8. UNIX for Advanced & Expert Users

What is the function to get address of the virtual memory block in linux??

I want address of current virtual memory block? i am using fedora10:wall::wall: (1 Reply)
Discussion started by: powyama
1 Replies

9. Solaris

[DOUBT] Memory high in idle process on Solaris 10 (Memory Utilization > 90%)

Hi Experts, Our servers running Solaris 10 with SAP Application. The memory utilization always >90%, but the process on SAP is too less even nothing. Why memory utilization on solaris always looks high? I have statement about memory on solaris, is this true: Memory in solaris is used for... (4 Replies)
Discussion started by: edydsuranta
4 Replies

10. UNIX for Beginners Questions & Answers

How to write a value to a physical memory address in bash script?

How would I write a value to a physical memory address? I was able to read a physical memory address (for example, 0x400) using this line: dd if=/dev/mem count=4 bs=1 skip=$(( 0x400 )) But I get an error: dd: 'standard input': cannot skip to specified offset when I try to write using... (1 Reply)
Discussion started by: rabrandt
1 Replies
Getting Terminal information(3) 				      BrlAPI					   Getting Terminal information(3)

NAME
Getting Terminal information - How to get information about the connected Terminal. Macros #define BRLAPI_MAXNAMELENGTH 31 Functions int BRLAPI_STDCALL brlapi_getDriverName (char *buffer, size_t size) int BRLAPI_STDCALL brlapi__getDriverName (brlapi_handle_t *handle, char *buffer, size_t size) int BRLAPI_STDCALL brlapi_getDisplaySize (unsigned int *x, unsigned int *y) int BRLAPI_STDCALL brlapi__getDisplaySize (brlapi_handle_t *handle, unsigned int *x, unsigned int *y) Detailed Description Before using Raw mode or key codes, the application should always check the type of the connected terminal, to be sure it is really the one it expects. One should also check for display size, so as to adjust further displaying on it. Macro Definition Documentation #define BRLAPI_MAXNAMELENGTH 31 Maximum name length for names embeded in BrlAPI packets, not counting any termination character Function Documentation int BRLAPI_STDCALL brlapi__getDisplaySize (brlapi_handle_t *handle, unsigned int *x, unsigned int *y) int BRLAPI_STDCALL brlapi__getDriverName (brlapi_handle_t *handle, char *buffer, size_tsize) int BRLAPI_STDCALL brlapi_getDisplaySize (unsigned int *x, unsigned int *y) Return the size of the braille display int BRLAPI_STDCALL brlapi_getDriverName (char *buffer, size_tsize) Return the complete name of the driver used by brltty This function fills its argument with the whole name of the braille terminal if available, terminated with a ''. Parameters: buffer is the buffer given by the application; size is the maximum size for the name buffer. Returns: -1 on error, or a positive value giving the size of the needed buffer, if the supplied one is to small (same as snprintf()). Author Generated automatically by Doxygen for BrlAPI from the source code. Version 1.0 Fri Jun 7 2013 Getting Terminal information(3)
All times are GMT -4. The time now is 08:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy