Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl-copy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Richard M Kreuter
cmucl-copy
Commits
47fdf1ab
Commit
47fdf1ab
authored
30 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Don't try to grow in-place in os_reallocate. This routine is only called by
genesis anyway.
parent
9d268790
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisp/os-common.c
+14
-22
14 additions, 22 deletions
lisp/os-common.c
with
14 additions
and
22 deletions
lisp/os-common.c
+
14
−
22
View file @
47fdf1ab
...
@@ -2,6 +2,10 @@
...
@@ -2,6 +2,10 @@
#include
"os.h"
#include
"os.h"
/* Except for os_zero, these routines are only called by Lisp code. These
routines may also be replaced by os-dependent versions instead. See
hpux-os.c for some useful restrictions on actual usage. */
void
os_zero
(
addr
,
length
)
void
os_zero
(
addr
,
length
)
os_vm_address_t
addr
;
os_vm_address_t
addr
;
os_vm_size_t
length
;
os_vm_size_t
length
;
...
@@ -53,6 +57,9 @@ os_vm_size_t len;
...
@@ -53,6 +57,9 @@ os_vm_size_t len;
os_invalidate
(
addr
,
len
);
os_invalidate
(
addr
,
len
);
}
}
/* This function once tried to grow the chunk by asking os_validate if the
space was available, but this really only works under Mach. */
os_vm_address_t
os_reallocate
(
os_vm_address_t
addr
,
os_vm_size_t
old_len
,
os_vm_address_t
os_reallocate
(
os_vm_address_t
addr
,
os_vm_size_t
old_len
,
os_vm_size_t
len
)
os_vm_size_t
len
)
{
{
...
@@ -67,33 +74,18 @@ os_vm_address_t os_reallocate(os_vm_address_t addr, os_vm_size_t old_len,
...
@@ -67,33 +74,18 @@ os_vm_address_t os_reallocate(os_vm_address_t addr, os_vm_size_t old_len,
if
(
len_diff
<
0
)
if
(
len_diff
<
0
)
os_invalidate
(
addr
+
len
,
-
len_diff
);
os_invalidate
(
addr
+
len
,
-
len_diff
);
else
if
(
len_diff
!=
0
){
else
{
#if 1
if
(
len_diff
!=
0
){
os_vm_address_t
new
=
NULL
;
new
=
os_allocate
(
len
);
#else
os_vm_address_t
new
=
os_validate
(
addr
+
old_len
,
len_diff
);
#endif
if
(
new
==
NULL
||
new
!=
addr
+
old_len
){
if
(
new
!=
NULL
){
if
(
new
!=
NULL
)
bcopy
(
addr
,
new
,
old_len
);
/* allocated alright, but in the wrong place */
os_invalidate
(
addr
,
old_len
);
os_invalidate
(
new
,
len_diff
);
new
=
os_allocate
(
len
);
if
(
new
!=
NULL
){
bcopy
(
addr
,
new
,
old_len
);
os_invalidate
(
addr
,
old_len
);
}
}
addr
=
new
;
addr
=
new
;
}
}
#if 0
else
fprintf(stderr,"Map grow: [0x%08x] %x -> %x\n", addr, old_len,len);
#endif
}
}
return
addr
;
return
addr
;
}
}
}
}
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