|
From a question on the Practice C test from GeekInterview, why is the size of ptr1 2, while ptr2 and ptr3 are size of 4?
main() { char near * near *ptr1; char near * far *ptr2; char near * huge *ptr3; printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof...
Started by nbolton on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
(The "huge" specifier is a non-standard far pointer syntax, for handling some specific far pointer cases...)
When working on architectures... .
A far pointer requires two 16 bit addresses, in this case .
Far pointers.
Because you're using near pointers vs.
|
|
What is the relation between word length, character size, integer size, and byte in C++?
Started by yesraaj on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
A character is defined is, don't make any assumptions about the... .
A byte is a byte is a byte -- 8 bits, no more, no less .
The size of numeric types is generally a multiple of the machine word size.
Of depends on what you mean by relation.
|
|
Looking at the properties for a windows file I get two attributes, Size & Size on disk and Size on disk is always larger.
What do these two metrics mean?
Started by Gavin Miller on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
The size of a cluster can vary that is from 1 to 4096 bytes ....
size on disk is the actual amount of space being take allocates space for files in "clusters" or "allocation units".
Size is the actual size of the file in bytes.
|
Ask your Facebook Friends
|
Possible Duplicate:
Why isn’t sizeof for a struct equal to the sum of sizeof of each member?
Why is the sizeof(); of this structure 16 bytes? I'm compiling in g++.
struct bitmapfileheader { unsigned short bfType; unsigned int bfSize; unsigned short bfReserved...
Started by Lukas on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
In many cases, it is desirable....
It's because the 4 byte ints are aligned to a 4 byte boundry, so there are 2 bytes of padding after bfType -1 : bfType +2 -3 : <padding> +4 -7: bfSize +8 -9: bfReserve1 +10 -11: bfReserve2 +12 -15 .
|
|
I paid $59.95 for Vimeo Plus only to find that there is a 1 gig limit on video size.
I have a 4 gig mp4 video file that I shot with the HD Flip Mino. How do I reduce it to no more than 1 gig without losing too much quality?
Answer Snippets (Read the full thread at superuser):
You can try using something such as ffmpeg or mencoder to reencode it with a lower bitrate, e.g.:
# Calculate the bitrate you need by dividing 1 GB by the video length in seconds # So, for a video of length 16:40 (1000 seconds), use a bitrate of 1 bytes... .
|
|
Possible Duplicate:
How to increase the max upload file size in C#.net
hi, 1. i need to upload an file which is around 4 mb. what is setting that i should do in web config file so that. i can save my file on server with no issues thank you
Started by prince23 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to increase this ,changes necessary in webconig
you need to change the httpRuntime in... .
Increase the maxRequestLength setting in your Web.Config: http://msdn.microsoft.com/en-us/kb/kb00323245.aspx
Upto 4096 KB (4MB) is the default capacity .
|
|
Is there any command to get virtual memory size, cache size and front side bus speed of a linux system? Is swap in linux same as virtual memory?
Started by pineapple on
, 9 posts
by 7 people.
Answer Snippets (Read the full thread at superuser):
Page Size :
$ getconf PAGESIZE
(or)
$ getconf PAGE_SIZE
Try
swapinfo or swapinfo -a
swapon -s
The used field will indicate the amount currently in use
Filename Type Size Used Priority /dev/sda5 memory size Use swapon -s or....
|
|
I don't get why I get 0 when I use printf and %d to get the size of my vector:
vector<long long> sieve; int size; ... //add stuff to vector ... size = sieve.size(); printf("printf sieve size: %d \n", size); //prints "printf sieve size: 0" std::cout...
Started by apphacker on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
What....
Couldn't say why printf isn't working, though.
())); return 0; } $ g++ trySize.C $ ./a.out sizeof(size_t): 4 sizeof(sieve.size()): 4 sizeof(sieve.sizevector sizes are size_t , which I believe is usually a long ...
|
|
I have a set of enumeration values that have 138 values. Something like:
type TSomething = (sOne, sTwo, sThree, ..., ..., sOnehundredAndThirtyeight); TSomethings = set of TSomething; .... TSomething = class(TPersistent) private fSomethings: TSomethings...
Started by smartins on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can either reduce the set size, or use a custom class instead of a set, or you can split the enumeration into a few sets that each has....
The size, in bytes, of a set can be calculated by High(set) div 8 - Low(set) div 8 + 1 .
Section.
|
|
I want to know (for debugging and logging) the size of an object in bytes, but not like
Sizeof (Object)
but like a 'deep sizeof'. For example if the object contains a hash map or a list, the real size needed by that hash map or list should be added to...
Started by Smasher on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Cast each group of 4.
Using TObject.InstanceSize.
Become very dirty:
Find the object size in bytes.
|