02-20-2008
Quote:
Originally Posted by
gneen
My box has 6GB of memory BTW - but it would appear that my gawk has a 1.5GB limit (either compiled in or part of the OS - but in either event I don't think I can change it).
It's an architectual limit of an OS running in 32-bit or 32-PAE mode. The address space available to single processes is limited to 32 bits, which is 4 GB. The top half of this address space is reserved for shared memory and the OS. If this is Linux, you can actually move that boundary up a gig, so that the process can use 3 GB, which should allow you to process files that are about 2.5 GB in size.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need help to parse a file where there are many records, all of which are consistently separated by lines containing “^=============” and "^ End of Report".
Example:
=============
1
2
3
4
End of record
=============
1
3
4
End of record
Etc....
I only need specific lines... (5 Replies)
Discussion started by: jouuu
5 Replies
2. Shell Programming and Scripting
Hi,
I have two files. 1st file has 1 column (huge file containing ~19200000 lines) and 2nd file has 2 columns (small file containing ~6000 lines).
#################################
huge_file.txt
a
a
ab
b
##################################
small_file.txt
a 1.5
b 2.5
ab ... (4 Replies)
Discussion started by: AshwaniSharma09
4 Replies
3. Shell Programming and Scripting
hi,
i have two files.
file1.sh
echo "unix"
echo "linux"
file2.sh
echo "unix linux forums"
now the output i need is
$./file2.sh
unix linux forums (3 Replies)
Discussion started by: snreddy_gopu
3 Replies
4. Shell Programming and Scripting
I have a configuration file that contains hundreds of these chunks. Each "chunk" is the section that begins with "define service {" and ends with "}".
define service {
check_command check_proc!java
hostgroup_name
service_description ... (5 Replies)
Discussion started by: SkySmart
5 Replies
5. Shell Programming and Scripting
I have a file that looks like this:
cat includes
CORP-CRASHTEST-BU
e:\crashplan\
CORP-TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
CORP-LABS_TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
What I want to do is make three new files with just those selections. So the three... (4 Replies)
Discussion started by: newbie2010
4 Replies
6. Shell Programming and Scripting
I really can't figure this one out.
I have 2 files, one file is a list of hostnames and the other is a list of their corresponding IPs:
fileA:
example.com
another.org
thirdie.net
fileB:
1.1.1.1
2.2.2.2
3.3.3.3
I want to create a fileC that looks like:
example.com 1.1.1.1... (2 Replies)
Discussion started by: zstar
2 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
8. Shell Programming and Scripting
I have a bunch of file numbers in the file 'test':
I'm trying the above command to change all the instances of "H" to "Na+" in the file testsds.pdb at the line numbers indicated in the file 'test'. I've tried the following and various similar alternatives but nothing is working:
cat test |... (3 Replies)
Discussion started by: crunchgargoyle
3 Replies
9. Shell Programming and Scripting
HI,
I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213
file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf
4343,asas,sdds,dsds
6767,asas,fdfd,fdffd
I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Discussion started by: Little
6 Replies
10. Shell Programming and Scripting
I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies
LEARN ABOUT FREEBSD
mlockall
MLOCKALL(2) BSD System Calls Manual MLOCKALL(2)
NAME
mlockall, munlockall -- lock (unlock) the address space of a process
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/mman.h>
int
mlockall(int flags);
int
munlockall(void);
DESCRIPTION
The mlockall() system call locks into memory the physical pages associated with the address space of a process until the address space is
unlocked, the process exits, or execs another program image.
The following flags affect the behavior of mlockall():
MCL_CURRENT Lock all pages currently mapped into the process's address space.
MCL_FUTURE Lock all pages mapped into the process's address space in the future, at the time the mapping is established. Note that this
may cause future mappings to fail if those mappings cause resource limits to be exceeded.
Since physical memory is a potentially scarce resource, processes are limited in how much they can lock down. A single process can lock the
minimum of a system-wide ``wired pages'' limit vm.max_wired and the per-process RLIMIT_MEMLOCK resource limit.
If security.bsd.unprivileged_mlock is set to 0 these calls are only available to the super-user. If vm.old_mlock is set to 1 the per-process
RLIMIT_MEMLOCK resource limit will not be applied for mlockall() calls.
The munlockall() call unlocks any locked memory regions in the process address space. Any regions mapped after an munlockall() call will not
be locked.
RETURN VALUES
A return value of 0 indicates that the call succeeded and all pages in the range have either been locked or unlocked. A return value of -1
indicates an error occurred and the locked status of all pages in the range remains unchanged. In this case, the global location errno is
set to indicate the error.
ERRORS
mlockall() will fail if:
[EINVAL] The flags argument is zero, or includes unimplemented flags.
[ENOMEM] Locking the indicated range would exceed either the system or per-process limit for locked memory.
[EAGAIN] Some or all of the memory mapped into the process's address space could not be locked when the call was made.
[EPERM] The calling process does not have the appropriate privilege to perform the requested operation.
SEE ALSO
mincore(2), mlock(2), mmap(2), munmap(2), setrlimit(2)
STANDARDS
The mlockall() and munlockall() functions are believed to conform to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
The mlockall() and munlockall() functions first appeared in FreeBSD 5.1.
BUGS
The per-process resource limit is a limit on the amount of virtual memory locked, while the system-wide limit is for the number of locked
physical pages. Hence a process with two distinct locked mappings of the same physical page counts as 2 pages against the per-process limit
and as only a single page in the system limit.
BSD
December 25, 2012 BSD