Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamar Christina
GHC
Commits
ddc0d28c
Commit
ddc0d28c
authored
13 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
update to track changes to CCCS in the RTS
parent
bf9d5a3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/integer-gmp/cbits/alloc.c
+4
-2
4 additions, 2 deletions
libraries/integer-gmp/cbits/alloc.c
with
4 additions
and
2 deletions
libraries/integer-gmp/cbits/alloc.c
+
4
−
2
View file @
ddc0d28c
...
...
@@ -67,14 +67,16 @@ stgAllocForGMP (size_t size_in_bytes)
{
StgArrWords
*
arr
;
nat
data_size_in_words
,
total_size_in_words
;
Capability
*
cap
;
/* round up to a whole number of words */
data_size_in_words
=
ROUNDUP_BYTES_TO_WDS
(
size_in_bytes
);
total_size_in_words
=
sizeofW
(
StgArrWords
)
+
data_size_in_words
;
/* allocate and fill it in. */
arr
=
(
StgArrWords
*
)
allocate
(
rts_unsafeGetMyCapability
(),
total_size_in_words
);
SET_ARR_HDR
(
arr
,
&
stg_ARR_WORDS_info
,
CCCS
,
size_in_bytes
);
cap
=
rts_unsafeGetMyCapability
();
arr
=
(
StgArrWords
*
)
allocate
(
cap
,
total_size_in_words
);
SET_ARR_HDR
(
arr
,
&
stg_ARR_WORDS_info
,
((
CapabilityPublic
*
)
cap
)
->
r
.
rCCCS
,
size_in_bytes
);
/* and return a ptr to the goods inside the array */
return
arr
->
payload
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment