Sponsored Content
Top Forums Programming How access a specific memory portion through printf() function???? Post 302615319 by shamrock on Thursday 29th of March 2012 11:17:20 AM
Old 03-29-2012
Quote:
Originally Posted by gabam
Is it possible to read data from a specific memory address directly, without creating any pointers???
Looking forward to your helpful replies!
Thanks in advance!
Yes it is possible on a system that doesnt implement any kind of memory management...so that there is no translation from logical to physical memory..."what you want is what you get". It is highly unlikely to find a MPU that doesnt implement memory mgmt nowadays even in the world of embedded systems...so looks like "you cant always get what you want..." Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print a % within a printf() function using awk

Here is the code I'm using { printf("%11d %4.2f\% %4.2f\%\n", $1,$2,$3); } I want the output to look something like 1235415234 12.24% 52.46% Instead it looks something like 319203842 42.27\%4.2f\% How do I just print a "%" without awk or printf thinking I'm trying to do... (1 Reply)
Discussion started by: Awanka
1 Replies

2. Programming

why printf() function don't go work?

I use FreeBSD,and use signal,like follows: signal(SIGHUP,sig_hup); signal(SIGIO,sig_io); when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies

3. Shell Programming and Scripting

Collecting specific portion from a file

I have a file which contains data like a b x col1:data1 formula:data3 this is for 2 a c col1:@bkw formula:dontad ad asd as per a \ i want the data from col1 and formula to keep the col1 data in left side of excel and col2 data in right side of it (1 Reply)
Discussion started by: bmrout007
1 Replies

4. Solaris

File cache portion of memory on Solaris

I'm looking to get the file cache portion of physical (real) memory on a Solaris workstation (Similar to the Cache: line in /proc/meminfo on some Linux systems): # swap -s; swap -l; vmstat 2 2; echo "::memstat" | mdb -k total: 309376k bytes allocated + 41428k reserved = 350804k used,... (5 Replies)
Discussion started by: Devyn
5 Replies

5. Shell Programming and Scripting

Assigning a specific format to a specific column in a text file using awk and printf

Hi, I have the following text file: 8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm 9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm 10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm 11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies

6. Shell Programming and Scripting

Cutting out text from specific portion on filename

Hi, how do I go about cutting out the first numeric characters after the word "access"? access1005101228.merged-00.15.17.86.d8.b8.log.gz (16 Replies)
Discussion started by: GermanJulian
16 Replies

7. Programming

Internals of the printf function?

hey all, im a new programmer. i was wondering how you would go about writing the printf function yourself? it is my understanding that when you call printf you are calling an already written function and just providing an argument? if this is the case, is it possible to write that function... (8 Replies)
Discussion started by: Christian.B
8 Replies

8. Shell Programming and Scripting

Extract portion of log info based on specific word

Hi Gurus, I'm using HP-UX B.11.23 operating system. I've been trying to extract a specific wording for example: "A tool used by tp produced warnings" from my below log data, but could not find a way to solve it. My intention is, if the log contain the word: "A tool used by tp produced... (9 Replies)
Discussion started by: superHonda123
9 Replies

9. Shell Programming and Scripting

Help with reading a specific portion of a file using PERL

Hello, I am trying to read from a file using PERL:confused, however i need to read specific portions of the file the file goes like this <Name 1 Hono <Name 2 Jack and so on anyways i need to be able to write a program that ONLY opens the lines beginning with "<"? so it would... (2 Replies)
Discussion started by: UNDstudent
2 Replies

10. UNIX for Dummies Questions & Answers

printf function

#include<stdio.h> int counter; int fibonacci(int n) { counter += 1; if ( n <= 2 ) return 1; else return fibonacci(n-1) + fibonacci(n-2); } int main(void) { int i; int sum ; for( i = 1 ; i<= 10; i++) { counter = 0; sum... (1 Reply)
Discussion started by: vincent__tse
1 Replies
VIOMB(4)						   BSD Kernel Interfaces Manual 						  VIOMB(4)

NAME
viomb -- VirtIO memory ballooning driver SYNOPSIS
virtio* at pci? dev ? function ? viomb* at virtio? DESCRIPTION
virtio(4) defines an interface for efficient, standard, and extensible I/O between the hypervisor and the virtual machine. The viomb driver supports the virtio-compliant memory ballooning device. Memory ballooning works as follows: 1. The host operator requests a guest to return some amount of memory to the host (via e.g. Qemu monitor balloon command). 2. The hypervisor sends the request via VirtIO memory ballooning device. 3. The guest viomb driver requests allocation of that amount of physical memory from the NetBSD memory management system. 4. The viomb device tells the hypervisor the guest physical memory address of the allocated memory via VirtIO memory ballooning device. The sysctl node hw.viomb.npages shows the requested number of memory pages to return to the hypervisor, while hw.viomb.actual shows the actual number of memory pages that are already returned to the hypervisor. SEE ALSO
virtio(4), sysctl(8) Rusty Russell, IBM Corporation, Virtio PCI Card Specification, http://ozlabs.org/~rusty/virtio-spec/. HISTORY
The viomb device driver appeared in NetBSD 6.0. BUGS
The userland interface should be same as the Xen ballooning device. BSD
November 26, 2011 BSD
All times are GMT -4. The time now is 03:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy