Programming :: How To Allocate Region Of Memories Which Similar VirtualAlloc?

May 21, 2011

I was looking for a method of allocating memories on Linux which similar VirtualAlloc on Windows.Requirements are:

1. Size of memories block to allocate is 2^16.
2. Address of memories block is larger than 0x0000ffff
3. Address of memories block must have last 16 bits are zero.

On Windows because lower limit of application address (lpMinimumApplicationAddress) we have (2) obvious right. From (1), (2) and system rules we also achieved (3).

View 2 Replies


ADVERTISEMENT

Programming :: Access Not Within Mapped Region At Address

Jan 28, 2011

I am receiving that error through Valgrind, I don't know the meaning of the error so I don't know what to check.

View 2 Replies View Related

Software :: Filesystem For Flash Memories?

Jan 31, 2011

I've been looking on the internet on what filesystem is best suited for flash memories like USB keys, mmc, SD cards and the likes, but I'm not feeling quite satisfied with the answers I got.There are two use cases I'm dealing with:1) I have an SD card that I want to use for storing some data I'm working on. I need to preserve file permissions, and I need to maximize seek and read speed, but the filesystem is accessed for writes quite often too.2) I want to install a linux distribution on a USB keyNow, I've been reading around that said memories are block devices, and that I should stick to regular filesystems. I went for ext2 for the first case, but I experienced data loss on a brand new PNY SD card, which is unacceptable.

Also, I suspect ext2 is striving for writing files consecutively or in some other harddisk-optimized way, which looks like a complete waste to me.In addition, other filesystems would flood the memory with journal crap.I looked into JFFS2, UBIFS, LogFS and here's what I came up with (some statements are contraddictory):- journaling might shorten the memory's life, and it will definitely slow things down- wear leveling is always hardware-implemented, and a software wear leveling could cancel out with the hardware's effort- hardware wear leveling has often a cheap implementation, and a better software wear leveling is desirable- JFFS2 doesn't store any index on the device; this comes at the cost of a slow mount but the flash memory is accessed less often- LogFS should work well on memories up to 64mb- MTD-oriented filesystems can be used on block devices- ext3 = ext2 + journaling- ext3 is not just ext2 with journalingSo, is there anyone who can add someclarification to all this? Should I go ext2 everywhere, or ext4, or should I try one of those MTD filesystems? If so which one? What's the risk/drawback of each solution?

View 7 Replies View Related

Programming :: Allocate A Cpu Core For Kernel Process?

Aug 3, 2010

My system has Intel Xeon 4-core cpu(hyperthreading 8-core) and run 64-bit linux. I want to allocate one core for general process(kernel process & other processes). And then, I want to allocate the rest of core for the specific multi-thread program.

Q1: I know that I can pthread_setaffinity() for user-mode thread and mpstat for monitoring. So, how can I allocate a core for kernel process and monitor it?

Q2: How can I restrict use of the cores for the multi-thread program? I don't want kernel process to use the cores for the multi-thread program.

View 1 Replies View Related

Programming :: Allocate Memory To A Program Before Execution?

Jan 3, 2011

I went to an interview last week and there was this guy who asked a simple question that i have been trying to solve for a couple of days. I tried google but i just cant get the search keywords right. The result were just useless. Well, the question is : "How can we allocate a limited memory to a process before we start its execution" well, the question is related to an X11 system so may be some flags must be set to limit its memory.

View 9 Replies View Related

Programming :: Malloc Fails To Allocate Memory

May 7, 2011

I am developing a code where I need to store the planes of an object in a tree & also i need to store it in a list for further processing ... when I try to allocate using malloc the memory allocation when i checked this in internet , I came to know that it may because the memory that I am trying to allocate may be more than the size_t variable.

View 9 Replies View Related

Programming :: Memory Allocate In Function And Call It By Reference For Array Structure?

Jul 2, 2011

I am writing a function(in C language in Linux) to initialize an array of a structure from a mysql table by calling a function by reference but I have a problem with call this function by reference . this is my program:PHP Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

[code]...

View 4 Replies View Related

Programming :: Vuse The Capacity Feature To Allocate All Memory At Beginning Of Program?

Jan 7, 2010

I have a vector that I do not want to call new on during operation so I use the Capacity Feature to allocate all memory at beginning of program

Code:
struct chartype
{
public:
unsigned char value[MAXCHARTYPE_SIZE];
};

[Code].....

View 2 Replies View Related

Programming :: Get Similar Results Using Both Gcc And G++

Mar 7, 2011

consider these lines of code and their outputs:

[CODE]
int C = 0;
fprintf(stdout, "
(C, ++C) Bef = %d, Aft = %d
", C, ++C);
fprintf(stdout, "(C++, C) Bef = %d, Aft = %d
", C++, C);

[Code].....

The only one that looks right to me is the second one. I get similar results using both gcc and g++.

View 4 Replies View Related

Programming :: Use Of Dlopen When Forking Many Similar Processes?

Dec 27, 2010

I am building a queue system (in C on CentOS 5) where each directory queue has a number of process instances 'watching' it. I have a root-permission queue supervisor process which does all the forking, and the instance processes give up root as their first action. For max security each queue is accessible to a different set of users and groups.

I need to keep the RAM requirements as low as possible, so I am relying heavily on copy-on-write (since all memory writes are to shmget() shared memory)

Each process presently dlopen's the libraries it requires after fork, but I'm wondering if I would gain by performing the dlopen before forking a number of instances which all require the same libraries.

Any pointers to mid-level tutorials on dlopen and fork internals would be most appreciated: this is about my third post anywhere since I converted to Linux, but I just can't find the answer to this anywhere online.

View 3 Replies View Related

Programming :: Possible To Make Application Module Similar To LKM?

Feb 8, 2011

Is it possible to create a loadable module for a C app that could be loaded into the app in runtime from a CLI or web interface?I would like the code to handle a particular type of structure to be "swappable" for lack of a better term. This would allow different modules to be used based on the users wants without having to mess with code. A different module could be downloaded into the application directory then loaded. Basicaly the code would be handed a pointer process it then return it.

View 2 Replies View Related

Software :: Software For Converting Region 1 Dvd To Region 2?

Nov 5, 2010

looking for linux (ubuntu) software for converting region 1 dvd to region 2

View 14 Replies View Related

Programming :: Bash Script To Find And Remove Similar Lines From Multiple Files?

Jun 5, 2009

I want to remove duplicate or multiple similar lines from multiple files. I.e. if I have four files file1.txt file2.txt file3.txt and file4.txt and would like to find and remove similar lines from all these files keeping only one line from these similar lines. I only that uniq can be used to remove similar lines from a sorted file.

View 9 Replies View Related

Programming :: Perl: Turning A Seconds-since-the-epoch Number Into "X Days Ago" Or Similar?

Aug 26, 2010

Is there a perl module that will let me turn numbers into human readable measures of time? For example, 1280513294 would be "26 days ago". If so, what's its name?

View 2 Replies View Related

Programming :: Shell Scripting / Create A Shell Script Similar To Ls?

Jun 5, 2011

I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.

Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....

View 10 Replies View Related

Ubuntu :: Cannot Reserve MMIO Region

Nov 21, 2010

That's the message I see briefly right before I am booted into Ubuntu Meerkat. It's right after the boot menu and the boot into Ubuntu begins and the screen is still black when that message appears.

View 2 Replies View Related

Ubuntu :: Use Multiple Region Codes At Once?

Apr 2, 2011

I realized I can watch DVDs on my laptop. I tried the first DVD that I had tried it on, and it didn't work. I am thinking this may be something to do with region codes. First of all, how do I see which region code I am currently on? Secondly, how do I reset the region code? Is there any way to use multiple region codes at once?

View 9 Replies View Related

OpenSUSE Multimedia :: Change Region Of Copied DVD?

Apr 11, 2010

I have many DVDs that I purchased in Europe (Region 2) and I would like to copy them and change the region for easier reading here in North America (Region 1). In an ideal world, region 0 would be even better.k9copy works fine as far as copying, but the region is kept. I haven't found any setting in k9copy to change the region - is there one? If not, any other application that can do it?

View 9 Replies View Related

Ubuntu :: Touchpad To Big - Can Disable The Outer Region ?

Jun 20, 2010

I have this 17" Dell laptop, and the touchpad is huge. My family use it and when we're typing, we brush of this incredibly large touchpad and end up pumping characters into the middle of a prior paragraph.

They've reduced the size of the touchpad on the newer versions of this model, but I'm wondering is it possible to hack it somehow so the outer perimeter (say 1cm) is 'dead'?

Most configuration software available is of no use to me since I think it's not a synaptics mouse. (I don't have multitouch - that's why I think this)

This is really frustrating. Does anyone know how I can do this?

Code:

View 4 Replies View Related

General :: Check DVD Region Code From Command Line?

May 3, 2010

Is there a way to get DVD region code from command line (linux/ubuntu 9.10)? I want to script this action and store the region code (and other data about DVD) in a log.

I am looking for the info about media, not the drive.

View 1 Replies View Related

Ubuntu Multimedia :: Karmic Cant Play Region 1 DVDs?

Jan 11, 2010

My laptop is having issues with DVD's. I can play region free DVD's (they were gifts), but I can't play any of my legit Region 1 DVD's? I downloaded the codecs from the software center but for whatever reason, They don't work, both Mplayer and Movie player just give me error messages when I load the disks. I know the disks are being read, their name pops up and everything, but I guess it just cant read the files.

View 9 Replies View Related

Ubuntu :: Shpchp 0000:00:01.0 - Cannot Reserve MMIO Region ?

May 7, 2010

What's up with this log message?

shpchp 0000:00:01.0: Cannot reserve MMIO region

After grub loads I get a flashing cursor then I get this message on the screen.

This is what I found in dmesg:

shpchp 0000:00:01.0: HPC vendor_id 1022 device_id 9602 ss_vid 0 ss_did 0

shpchp 0000:00:01.0: Cannot reserve MMIO region

shpchp: Standard Hot Plug PCI Controller Driver version: 0.4

I'm running an AMD laptop With Lucid x86_64, a custom install I did off the alternate iso with onlyLXDE installed.

All my hardware works fine and this just seems like some sort of bug.

Is there anyway I can silence all kernel messages at bootup?

This is what I have in /etc/default/grub and it's not working to silence it.

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=0 splash"

View 9 Replies View Related

Ubuntu Multimedia :: Region Free DVD Drive / Burner?

Jul 11, 2010

I know I can use things like regionset and VLC to bypass region encoding (which I already do), I was really wondering if you can actually purchase a drive that is "region free" without having to apply hacks/ patches/ voodoo etc.I've done the "google thing" and all I come up with is hacks while using windows, I'd really like to get a drive that is completely region free.

View 1 Replies View Related

Ubuntu :: Cannot Reserve MMIO Region At Boot Plox?

Jan 14, 2011

When i boot i get an error saying cannot reserve mmio region. It does not seen to affect anything,

View 2 Replies View Related

Debian :: Set System Time To Local Region Using Tzselect Command

Jun 14, 2011

i have a debian 5 vps system.. it reports the time as beeing one hour behind, i have tried to change this by setting the time to GMT+1 and setting the time to my local region (Europe-Brittian) using the tzselect command but none get the time to the correct time, one hour ahead of the current time.

View 3 Replies View Related

OpenSUSE :: YaST Install - Fatal Region Error Detected

Mar 2, 2010

When I deleted uninstalling and installing some packages in Yast2 I got this output:

Deleting mc
Additional rpm output:
rpmdb: PANIC: Invalid argument
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbcursor->c_put: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-30977) storing record "4.0-1" into Requireversion
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-30977) setting "3.0.4-1" records from Requireversion index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-30977) setting "" records from Requireversion index
and on and on for 3 pages for every package.

View 4 Replies View Related

Ubuntu :: Docky - Compiz Losing The Window Minimize Region

Jun 10, 2010

When using Docky and clicking the window minimize button the windows will randomly minimize to the cursor and not to the dock icon. Pressing the dock icon will work as expected. I have read through the Docky bug reports and it seems it has something to do with Docky and compiz losing the window minimize region.

View 2 Replies View Related

Fedora :: Rpmdb: PANIC: Fatal Region Error Detected; Run Recovery

Nov 12, 2009

I am getting an error from yum update and Kpackagekit:

[root@asus-m4n82 tylerm]# yum update
Loaded plugins: refresh-packagekit
Setting up Update Process
rpmdb: page 18816: illegal page type or format

[code]....

How do I "run recovery"? Edit: Ok so it looks like I had som bad ram in my system that caused this - I found a site that told me to do this:

rm -f /var/lib/rpm/__db*
rpm rebuilddb
yum clean all

I did this but now when I try something like yum install firefox it pulls in a ton of already installed packages.

View 2 Replies View Related

Ubuntu :: Cursor Move Within Limited Region Via Synergy During Dual Monitor?

Jan 24, 2011

I'm using Mac as a main machine and Ubuntu Netbook as a secondary. Although synergy gives me a good control over Netbook when it works without external monitor, but when I activate VGA monitor, I can only move around the limited region (details are below).

Phenomenon: Cursor can move in the external monitor's screen. No way to move cursor into the netbook's screen via synergy (it's possible from local touchpad/mouse) In the external monitor's screen, curosor moves only within limited region, which I'm guessing is as large as the size of netbook's screen.

Configuration: Use dual screens (uncheck "Same image in all monitors" in the tool "Monitor" on Ubuntu)

Env:
- OS: Ubuntu 10.04 Netbook edition
- HW: Starling Netbook (star3)

View 2 Replies View Related

CentOS 5 :: Insmod: Error Inserting /lib/dm-region-hash.ko -1 Fikle Exists

Mar 11, 2010

I have some problems with CentOS 5.4 and standard kernel 2.6.32.7, which I need for realtime extensions.With the solution in this thread: [URL] I could boot the new standard kernel , There are still two error messages during the boot process:

"insmod: error inserting /lib/dm-region-hash.ko -1 fikle exists"

and a problem with ip-tables "could not restore ip-tables line 20" or so

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved