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
Alex D
GHC
Commits
90490258
Commit
90490258
authored
15 years ago
by
marcotmarcot
Browse files
Options
Downloads
Patches
Plain Diff
rts/sm/GC.c: Annotate constants.
parent
d06fb840
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rts/sm/GC.c
+8
-8
8 additions, 8 deletions
rts/sm/GC.c
with
8 additions
and
8 deletions
rts/sm/GC.c
+
8
−
8
View file @
90490258
...
@@ -1115,8 +1115,8 @@ gcWorkerThread (Capability *cap)
...
@@ -1115,8 +1115,8 @@ gcWorkerThread (Capability *cap)
void
void
waitForGcThreads
(
Capability
*
cap
USED_IF_THREADS
)
waitForGcThreads
(
Capability
*
cap
USED_IF_THREADS
)
{
{
nat
n_threads
=
RtsFlags
.
ParFlags
.
nNodes
;
const
nat
n_threads
=
RtsFlags
.
ParFlags
.
nNodes
;
nat
me
=
cap
->
no
;
const
nat
me
=
cap
->
no
;
nat
i
,
j
;
nat
i
,
j
;
rtsBool
retry
=
rtsTrue
;
rtsBool
retry
=
rtsTrue
;
...
@@ -1190,8 +1190,8 @@ shutdown_gc_threads (nat n_threads USED_IF_THREADS, nat me USED_IF_THREADS)
...
@@ -1190,8 +1190,8 @@ shutdown_gc_threads (nat n_threads USED_IF_THREADS, nat me USED_IF_THREADS)
void
void
releaseGCThreads
(
Capability
*
cap
USED_IF_THREADS
)
releaseGCThreads
(
Capability
*
cap
USED_IF_THREADS
)
{
{
nat
n_threads
=
RtsFlags
.
ParFlags
.
nNodes
;
const
nat
n_threads
=
RtsFlags
.
ParFlags
.
nNodes
;
nat
me
=
cap
->
no
;
const
nat
me
=
cap
->
no
;
nat
i
;
nat
i
;
for
(
i
=
0
;
i
<
n_threads
;
i
++
)
{
for
(
i
=
0
;
i
<
n_threads
;
i
++
)
{
if
(
i
==
me
)
continue
;
if
(
i
==
me
)
continue
;
...
@@ -1478,8 +1478,8 @@ resize_generations (void)
...
@@ -1478,8 +1478,8 @@ resize_generations (void)
if
(
major_gc
&&
RtsFlags
.
GcFlags
.
generations
>
1
)
{
if
(
major_gc
&&
RtsFlags
.
GcFlags
.
generations
>
1
)
{
nat
live
,
size
,
min_alloc
,
words
;
nat
live
,
size
,
min_alloc
,
words
;
nat
max
=
RtsFlags
.
GcFlags
.
maxHeapSize
;
const
nat
max
=
RtsFlags
.
GcFlags
.
maxHeapSize
;
nat
gens
=
RtsFlags
.
GcFlags
.
generations
;
const
nat
gens
=
RtsFlags
.
GcFlags
.
generations
;
// live in the oldest generations
// live in the oldest generations
if
(
oldest_gen
->
live_estimate
!=
0
)
{
if
(
oldest_gen
->
live_estimate
!=
0
)
{
...
@@ -1568,7 +1568,7 @@ resize_generations (void)
...
@@ -1568,7 +1568,7 @@ resize_generations (void)
static
void
static
void
resize_nursery
(
void
)
resize_nursery
(
void
)
{
{
lnat
min_nursery
=
RtsFlags
.
GcFlags
.
minAllocAreaSize
*
n_capabilities
;
const
lnat
min_nursery
=
RtsFlags
.
GcFlags
.
minAllocAreaSize
*
n_capabilities
;
if
(
RtsFlags
.
GcFlags
.
generations
==
1
)
if
(
RtsFlags
.
GcFlags
.
generations
==
1
)
{
// Two-space collector:
{
// Two-space collector:
...
@@ -1628,7 +1628,7 @@ resize_nursery (void)
...
@@ -1628,7 +1628,7 @@ resize_nursery (void)
if
(
RtsFlags
.
GcFlags
.
heapSizeSuggestion
)
if
(
RtsFlags
.
GcFlags
.
heapSizeSuggestion
)
{
{
long
blocks
;
long
blocks
;
nat
needed
=
calcNeeded
();
// approx blocks needed at next GC
const
nat
needed
=
calcNeeded
();
// approx blocks needed at next GC
/* Guess how much will be live in generation 0 step 0 next time.
/* Guess how much will be live in generation 0 step 0 next time.
* A good approximation is obtained by finding the
* A good approximation is obtained by finding the
...
...
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