Sponsored Content
Top Forums Programming Limits on 32 and 64 bit in C++ / C Post 302996954 by arunkumar_mca on Thursday 4th of May 2017 02:31:12 PM
Old 05-04-2017
Limits on 32 and 64 bit in C++ / C

Hi All,

I am getting below run time error

Quote:
Bytes_read 2147483647 - file position 2147483647 - stat size -1047828448
I checked the code and see the structure defined as below and using the file position variable

Code:
typedef struct Get_file {
        char            *current_pathname;
        unsigned int    tot_bytes_io, physical_position;
        int file_position;
        int             remote;
        char            host[12];
        int             fd, open_mode;

the variable is a integer . I looked the binary and it was 32 bit compiled and the integer limit the output is saying is that. I did the compile in 64 bit. But I still see the issue . I am not sure why 64 bit compilation is not working

Thanks
 

5 More Discussions You Might Find Interesting

1. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies

2. Red Hat

boot the 32 bit kernel on a 64 bit PPC Linux machine?

Hi all, I'm looking to cover a corner case for an upcoming test cycle. Is there a way to boot a RedHat Advanced Server 4 (update 3) installed on a Power PC machine to use a 32 bit kernel? This would be similar to what is done here -> https://www.unix.com/aix/26204-aix-platform.html I've done... (0 Replies)
Discussion started by: philrau
0 Replies

3. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

4. UNIX for Dummies Questions & Answers

Soft and hard limits for nproc value in /etc/security/limits.conf file (Linux )

OS version : RHEL 6.5 Below is an excerpt from /etc/security/limits.conf file for OS User named appusr in our server appusr soft nproc 2047 appusr hard nproc 16384 What will happen if appusr has already spawned 2047 processes and wants to spawn 2048th process ? I just want to know... (3 Replies)
Discussion started by: kraljic
3 Replies

5. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies
LIMITS(3)						   BSD Library Functions Manual 						 LIMITS(3)

NAME
limits -- standard limits SYNOPSIS
#include <limits.h> DESCRIPTION
The <limits.h> header defines various compile-time and runtime limits. These can be grouped into three categories: 1. Compile-time limits defined in a header file. 2. Runtime system limits that are not associated with a file or directory; see sysconf(3). 3. Runtime limits that are associated with a file or directory; see pathconf(2). The <limits.h> header has been standardized by at least three entities. ISO Limits The limits defined by the ISO/IEC 9899:1999 (``ISO C99'') standard are all compile-time limits. The numerical (integer) limits are: Constant Type Minimum value CHAR_BIT char 8 SCHAR_MAX signed char 127 SCHAR_MIN signed char -127 UCHAR_MAX unsigned char 255 INT_MAX int 32767 INT_MIN int -32767 UINT_MAX unsigned int 65535 SHRT_MIN short -32767 SHRT_MAX short 32767 USHRT_MAX unsigned short 65535 LONG_MAX long int 2147483647 LONG_MIN long int -2147483647 ULONG_MAX unsigned long int 4294967295 LLONG_MAX long long int 9223372036854775807 LLONG_MIN long long int -9223372036854775807 ULLONG_MAX unsigned long long int 18446744073709551615 MB_LEN_MAX - 1 All listed limits may vary across machines and operating systems. The standard guarantees only that the implementation-defined values are equal or greater in absolute value to those shown. The values permit a system with 16-bit integers using one's complement arithmetic. Depending whether the system defines char as signed or unsigned, the maximum and minimum values are: Constant Type Minimum value CHAR_MAX char either SCHAR_MAX or UCHAR_MAX CHAR_MIN char either SCHAR_MIN or 0 The two special cases, CHAR_BIT and MB_LEN_MAX, define the number of bits in char and the maximum number of bytes in a multibyte character constant, respectively. POSIX Limits The POSIX.1 standard specifies numerous limits related to the operating system. For each limit, a separate constant prefixed with ``_POSIX_'' defines the lowest value that the limit is allowed to have on any POSIX compliant system. For instance, _POSIX_OPEN_MAX defines the minimum upper bound permitted by POSIX for the number of files that a single process may have open at any time. This ensures that a por- table program can safely reach these limits without prior knowledge about the actual limits used in a particular system. As the limits are not necessary invariant, pathconf(2) and sysconf(3) should be used to determine the actual value of a limit at runtime. The manual pages of these two functions also contain a more detailed description of the limits available in NetBSD. XSI Limits Also the X/Open System Interface Extension (XSI) specifies few limits. In NetBSD these are limited to LONG_BIT (the number of bits in long), WORD_BIT (the number of bits in a ``word''), and few limits related to float and double. SEE ALSO
getconf(1), pathconf(2), sysconf(3), types(3), unistd(3) Richard W. Stevens and Stephen A. Rago, Advanced Programming in the UNIX Environment, Addison-Wesley, Second Edition, 2005. BSD
August 9, 2011 BSD
All times are GMT -4. The time now is 11:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy