Huge executable examples
Example scenarios of huge executable usage.
Large program address space model example
MAXDATA=0x50000000(non-DSA)- shmat/mmap regions required in segments 0xB, 0xC and 0xE
- Shared library area text and pre-relocated data accessibility
0x0: System Segment
0x1:
0x2: Exec-time Private Dependencies / Stack
0x3: Process Heap
0x4: Process Heap
0x5: Process Heap
0x6: Process Heap
0x7: Process Heap
0x8:
0x9:
0xA:
0xB: shmat/mmap (mapped after exec)
0xC: shmat/mmap (mapped after exec)
0xD: Shared Library Text
0xE: shmat/mmap (mapped after exec)
0xF: Pre-relocated Library Data
You can see from this example that segments 0x8–0xA are available for the executable.
HUGE_EXEC=0HUGE_EXEC=0x8HUGE_EXEC=0x9
Options 1 and 2 would insert the executable into segments 0x8–0x9, while option 3 would insert the executable into segments 0x9–0xA.
Very large program address space model example
MAXDATA=0x50000000 DSA- shmat/mmap regions required in segments 0xB, 0xC and 0xE
- Shared library area text and pre-relocated data accessibility
0x0: System Segment
0x1:
0x2: Exec-time Private Dependencies / Stack
0x3: Process Heap
0x4: |
0x5: |
0x6: v
0x7: ____________ (data limit)
0x8:
0x9:
0xA:
0xB: shmat/mmap (mapped after exec)
0xC: shmat/mmap (mapped after exec)
0xD: Shared Library Text
0xE: shmat/mmap (mapped after exec)
0xF: Pre-relocated Library Data
You can see from this that segments 0x4–0xA are available for the executable.
HUGE_EXEC=0x8HUGE_EXEC=0x9
Option 1 would insert the executable into segments 0x8–0x9, while option 2 would insert the executable into segments 0x9–0xA.
HUGE_EXEC=0 setting
would not be appropriate for this customer since the system would choose segments
0xB–0xC for the executable (because of DSA). This would prevent those segments
from being available for shmat/mmap after the exec. Setting HUGE_EXEC to
any of 0x4, 0x5, 0x6, or 0x7 segments, while allowing the insertion to occur
as requested, would result in limiting process heap growth to the segment
just below the requested starting segment.Very large program address space model without access to shared library area example
MAXDATA=0xB0000000 DSA- No shmat/mmap regions
- No shared library area accessibility
0x0: System Segment
0x1:
0x2: Exec-time Private Dependencies / Stack
0x3: Process Heap
0x4: |
0x5: |
0x6: |
0x7: |
0x8: |
0x9: |
0xA: |
0xB: |
0xC: v
0xD: ____________ (data limit)
0xE:
0xF:
You can see from this that segments 0x4–0xF are available for the executable.
HUGE_EXEC=0HUGE_EXEC=0xE
Both options would insert the executable into segments 0xE–0xF.
Default process address space model example
MAXDATA=0(non-DSA)- No shmat/mmap regions
- Shared library area text and pre-relocated data accessibility
0x0: System Segment
0x1:
0x2: Exec-time Private Dependencies / Process Heap / Stack
0x3:
0x4:
0x5:
0x6:
0x7:
0x8:
0x9:
0xA:
0xB:
0xC:
0xD: Shared Library Text
0xE:
0xF: Pre-relocated Library Data
You can see from this that segments 0x3–0xC are available for the executable.
1. HUGE_EXEC=0
2. HUGE_EXEC=0x3
...
10. HUGE_EXEC=0xBOptions 1 and 2 have identical results – inserting the executable into segments 0x3–0x4.
shtext_in_one with a single shared library area text segment example
MAXDATA=0x70000000(non-DSA)- shmat/mmap regions required in segments 0xC, 0xD, 0xE and 0xF
- Shared library area accessibility
0x0: System Segment
0x1: Shared Library Text
0x2: Exec-time Private Dependencies / Stack
0x3: Process Heap
0x4: Process Heap
0x5: Process Heap
0x6: Process Heap
0x7: Process Heap
0x8: Process Heap
0x9: Process Heap
0xA:
0xB:
0xC: shmat/mmap (mapped after exec)
0xD: shmat/mmap (mapped after exec)
0xE: shmat/mmap (mapped after exec)
0xF: shmat/mmap (mapped after exec)
You can see from this that segments 0xA–0xB are available for the executable.
HUGE_EXEC=0,shtext_in_oneHUGE_EXEC=0xA,shtext_in_one
Both options would insert the executable into segments 0xA–0xB and shared library text into segment 0x1.
shtext_in_one with two shared library area text segments example
MAXDATA=0x70000000 DSA- shmat/mmap regions required in segments 0xA and 0xB
- Shared library area (created with the doubletext32 attribute) text accessibility
0x0: System Segment
0x1: Shared Library Text (primary)
0x2: Exec-time Private Dependencies / Stack
0x3: Process Heap
0x4: |
0x5: |
0x6: |
0x7: |
0x8: v
0x9: ____________ (data limit)
0xA: shmat/mmap (mapped after exec)
0xB: shmat/mmap (mapped after exec)
0xC:
0xD:
0xE:
0xF: Shared Library Text (secondary)
You can see from this that segments 0xC–0xE are available for the executable.
HUGE_EXEC=0,shtext_in_oneHUGE_EXEC=0xC,shtext_in_one
Both options would insert the executable into segments 0xC–0xE and shared library text into segments 0x1 and 0xF.