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
mlib_ImageReformat(3MLIB)				    mediaLib Library Functions					 mlib_ImageReformat(3MLIB)

NAME
mlib_ImageReformat - image data buffer reformat SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageReformat(void **dstData, const void **srcData, mlib_s32 numBands, mlib_s32 xSize, mlib_s32 ySize, mlib_type dstDataType, const mlib_s32 *dstBandoffsets, mlib_s32 dstScanlinestride, mlib_s32 dstPixelstride, mlib_type srcDataType, const mlib_s32 *srcBandoffsets, mlib_s32 srcScanlinestride, mlib_s32 srcPixelstride); DESCRIPTION
The mlib_ImageReformat() function copies and casts, if needed, an image from one buffer to another. The formats and data types of the two buffers may be different. dstPixel[x][y][i] = (dstDataType) srcPixel[x][y][i] where the values of a pixel at position (x, y) and in channel i are: srcPixel[x][y][i] = srcData[i][srcBandoffsets[i] + srcScanlinestride*y + srcPixelstride*x] dstPixel[x][y][i] = dstData[i][dstBandoffsets[i] + dstScanlinestride*y + dstPixelstride*x] It is the user's responsibility to make sure that the data buffers supplied are suitable for this operation. The srcData and dstData can have 1, 2, 3, or 4 channels, and they must have the same number of channels. The srcDataType and dstDataType can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE. The conversions between different data types are implemented as described in the following table: Source Type Dest. Type Action ------------------------------------------------------------------------------------ MLIB_SHORT MLIB_BYTE (mlib_u8)clamp(x, 0, 255) MLIB_USHORT MLIB_BYTE (mlib_u8)clamp(x, 0, 255) ------------------------------------------------------------------------------------ MLIB_INT MLIB_BYTE (mlib_u8)clamp(x, 0, 255) ------------------------------------------------------------------------------------ MLIB_FLOAT MLIB_BYTE (mlib_u8)clamp(x, 0, 255) ------------------------------------------------------------------------------------ MLIB_DOUBLE MLIB_BYTE (mlib_u8)clamp(x, 0, 255) ------------------------------------------------------------------------------------ MLIB_BYTE MLIB_SHORT (mlib_s16)x ------------------------------------------------------------------------------------ MLIB_USHORT MLIB_SHORT (mlib_s16)clamp(x, -32768, 32767) ------------------------------------------------------------------------------------ MLIB_INT MLIB_SHORT (mlib_s16)clamp(x, -32768, 32767) ------------------------------------------------------------------------------------ MLIB_FLOAT MLIB_SHORT (mlib_s16)clamp(x, -32768, 32767) ------------------------------------------------------------------------------------ MLIB_DOUBLE MLIB_SHORT (mlib_s16)clamp(x, -32768, 32767) ------------------------------------------------------------------------------------ MLIB_BYTE MLIB_USHORT (mlib_u16)x ------------------------------------------------------------------------------------ MLIB_SHORT MLIB_USHORT (mlib_u16)clamp(x, 0, 65535) ------------------------------------------------------------------------------------ MLIB_INT MLIB_USHORT (mlib_u16)clamp(x, 0, 65535) ------------------------------------------------------------------------------------ MLIB_FLOAT MLIB_USHORT (mlib_u16)clamp(x, 0, 65535) ------------------------------------------------------------------------------------ MLIB_DOUBLE MLIB_USHORT (mlib_u16)clamp(x, 0, 65535) ------------------------------------------------------------------------------------ MLIB_BYTE MLIB_INT (mlib_s32)x ------------------------------------------------------------------------------------ MLIB_SHORT MLIB_INT (mlib_s32)x ------------------------------------------------------------------------------------ MLIB_USHORT MLIB_INT (mlib_s32)x ------------------------------------------------------------------------------------ MLIB_FLOAT MLIB_INT (mlib_s32)clamp(x, -2147483647-1, 2147483647) ------------------------------------------------------------------------------------ MLIB_DOUBLE MLIB_INT (mlib_s32)clamp(x, -2147483647-1, 2147483647) ------------------------------------------------------------------------------------ MLIB_BYTE MLIB_FLOAT (mlib_f32)x ------------------------------------------------------------------------------------ MLIB_SHORT MLIB_FLOAT (mlib_f32)x ------------------------------------------------------------------------------------ MLIB_USHORT MLIB_FLOAT (mlib_f32)x ------------------------------------------------------------------------------------ MLIB_INT MLIB_FLOAT (mlib_f32)x ------------------------------------------------------------------------------------ MLIB_DOUBLE MLIB_FLOAT (mlib_f32)x ------------------------------------------------------------------------------------ MLIB_BYTE MLIB_DOUBLE (mlib_d64)x ------------------------------------------------------------------------------------ MLIB_SHORT MLIB_DOUBLE (mlib_d64)x ------------------------------------------------------------------------------------ MLIB_USHORT MLIB_DOUBLE (mlib_d64)x ------------------------------------------------------------------------------------ MLIB_INT MLIB_DOUBLE (mlib_d64)x ------------------------------------------------------------------------------------ MLIB_FLOAT MLIB_DOUBLE (mlib_d64)x The actions are defined in C-style pseudo-code. All type casts follow the rules of standard C. clamp() can be defined as a macro: #define clamp(x, low, high) (((x) < (low)) ? (low) : (((x) > (high)) ? (high) : (x))) PARAMETERS
The function takes the following arguments: dstData The pointer to the destination image data buffer. srcData The pointer to the source image data buffer. numBands The number of channels of the image data buffers. xSize The width of the image. ySize The height of the image. dstDataType The data type of the dstData buffer. dstBandoffsets The initial pixel's offsets in the dstData buffer in terms of destination data buffer elements. dstScanlinestride The scanline stride of the dstData buffer in terms of destination data buffer elements. dstPixelstride The pixel stride of the dstData buffer in terms of destination data buffer elements. srcDataType The data type of the srcData buffer. srcBandoffsets The initial pixel's offsets in the srcData buffer in terms of source data buffer elements. srcScanlinestride The scanline stride of the srcData buffer in terms of source data buffer elements. srcPixelstride The pixel stride of the srcData buffer in terms of source data buffer elements. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageDataTypeConvert(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_ImageReformat(3MLIB)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy