Search Results

Search found 2 results on 1 pages for 'will bickford'.

Page 1/1 | 1 

  • Pointer Implementation Details in C

    - by Will Bickford
    I would like to know architectures which violate the assumptions I've listed below. Also I would like to know if any of the assumptions are false for all architectures (i.e. if any of them are just completely wrong). sizeof(int *) == sizeof(char *) == sizeof(void *) == sizeof(func_ptr *) The in-memory representation of all pointers for a given architecture is the same regardless of the data type pointed to. The in-memory representation of a pointer is the same as an integer of the same bit length as the architecture. Multiplication and division of pointer data types are only forbidden by the compiler. NOTE: Yes I know this is nonsensical. What I mean is - is there hardware support to forbid this incorrect usage? All pointer values can be casted to a single integer. In other words, what architectures still make use of segments and offsets? Incrementing a pointer is equivalent to adding sizeof(the pointed data type) to the memory address stored by the pointer. If p is an int32* then p+1 is equal to the memory address 4 bytes after p. I'm most used to pointers being used in a contiguous, virtual memory space. For that usage, I can generally get by thinking of them as addresses on a number line. See (http://stackoverflow.com/questions/1350471/pointer-comparison/1350488#1350488).

    Read the article

  • TortoiseHg Apply a Patch

    - by Michael La Voie
    TortoiseHg allows you to email a patch file of your changes to someone, but does it support applying patches? If so, how do you apply a patch using TortoiseHg? Solution Thanks @Will Bickford for your help. I just found this feature listed as a TODO on the TortoiseHg site.

    Read the article

1