Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
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
many-archive
Suyu
Commits
840b8569
There was an error fetching the commit references. Please try again later.
Commit
840b8569
authored
9 years ago
by
Yuri Kunde Schlesner
Browse files
Options
Downloads
Patches
Plain Diff
Kernel: Remove unused legacy heap MapBlock_* functions
parent
38bfbe1b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/hle/kernel/memory.cpp
+0
-60
0 additions, 60 deletions
src/core/hle/kernel/memory.cpp
src/core/hle/kernel/memory.h
+0
-17
0 additions, 17 deletions
src/core/hle/kernel/memory.h
src/core/system.cpp
+0
-1
0 additions, 1 deletion
src/core/system.cpp
with
0 additions
and
78 deletions
src/core/hle/kernel/memory.cpp
+
0
−
60
View file @
840b8569
...
@@ -109,59 +109,6 @@ static MemoryArea memory_areas[] = {
...
@@ -109,59 +109,6 @@ static MemoryArea memory_areas[] = {
{
TLS_AREA_VADDR
,
TLS_AREA_SIZE
,
"TLS Area"
},
// TLS memory
{
TLS_AREA_VADDR
,
TLS_AREA_SIZE
,
"TLS Area"
},
// TLS memory
};
};
/// Represents a block of memory mapped by ControlMemory/MapMemoryBlock
struct
MemoryBlock
{
MemoryBlock
()
:
handle
(
0
),
base_address
(
0
),
address
(
0
),
size
(
0
),
operation
(
0
),
permissions
(
0
)
{
}
u32
handle
;
u32
base_address
;
u32
address
;
u32
size
;
u32
operation
;
u32
permissions
;
const
u32
GetVirtualAddress
()
const
{
return
base_address
+
address
;
}
};
static
std
::
map
<
u32
,
MemoryBlock
>
heap_map
;
static
std
::
map
<
u32
,
MemoryBlock
>
heap_linear_map
;
}
u32
MapBlock_Heap
(
u32
size
,
u32
operation
,
u32
permissions
)
{
MemoryBlock
block
;
block
.
base_address
=
HEAP_VADDR
;
block
.
size
=
size
;
block
.
operation
=
operation
;
block
.
permissions
=
permissions
;
if
(
heap_map
.
size
()
>
0
)
{
const
MemoryBlock
last_block
=
heap_map
.
rbegin
()
->
second
;
block
.
address
=
last_block
.
address
+
last_block
.
size
;
}
heap_map
[
block
.
GetVirtualAddress
()]
=
block
;
return
block
.
GetVirtualAddress
();
}
u32
MapBlock_HeapLinear
(
u32
size
,
u32
operation
,
u32
permissions
)
{
MemoryBlock
block
;
block
.
base_address
=
LINEAR_HEAP_VADDR
;
block
.
size
=
size
;
block
.
operation
=
operation
;
block
.
permissions
=
permissions
;
if
(
heap_linear_map
.
size
()
>
0
)
{
const
MemoryBlock
last_block
=
heap_linear_map
.
rbegin
()
->
second
;
block
.
address
=
last_block
.
address
+
last_block
.
size
;
}
heap_linear_map
[
block
.
GetVirtualAddress
()]
=
block
;
return
block
.
GetVirtualAddress
();
}
}
void
Init
()
{
void
Init
()
{
...
@@ -186,11 +133,4 @@ void InitLegacyAddressSpace(Kernel::VMManager& address_space) {
...
@@ -186,11 +133,4 @@ void InitLegacyAddressSpace(Kernel::VMManager& address_space) {
address_space
.
Reprotect
(
shared_page_vma
,
VMAPermission
::
Read
);
address_space
.
Reprotect
(
shared_page_vma
,
VMAPermission
::
Read
);
}
}
void
Shutdown
()
{
heap_map
.
clear
();
heap_linear_map
.
clear
();
LOG_DEBUG
(
HW_Memory
,
"shutdown OK"
);
}
}
// namespace
}
// namespace
This diff is collapsed.
Click to expand it.
src/core/hle/kernel/memory.h
+
0
−
17
View file @
840b8569
...
@@ -31,22 +31,5 @@ namespace Memory {
...
@@ -31,22 +31,5 @@ namespace Memory {
void
Init
();
void
Init
();
void
InitLegacyAddressSpace
(
Kernel
::
VMManager
&
address_space
);
void
InitLegacyAddressSpace
(
Kernel
::
VMManager
&
address_space
);
void
Shutdown
();
/**
* Maps a block of memory on the heap
* @param size Size of block in bytes
* @param operation Memory map operation type
* @param permissions Memory allocation permissions
*/
u32
MapBlock_Heap
(
u32
size
,
u32
operation
,
u32
permissions
);
/**
* Maps a block of memory on the GSP heap
* @param size Size of block in bytes
* @param operation Memory map operation type
* @param permissions Control memory permissions
*/
u32
MapBlock_HeapLinear
(
u32
size
,
u32
operation
,
u32
permissions
);
}
// namespace
}
// namespace
This diff is collapsed.
Click to expand it.
src/core/system.cpp
+
0
−
1
View file @
840b8569
...
@@ -29,7 +29,6 @@ void Shutdown() {
...
@@ -29,7 +29,6 @@ void Shutdown() {
HLE
::
Shutdown
();
HLE
::
Shutdown
();
Kernel
::
Shutdown
();
Kernel
::
Shutdown
();
HW
::
Shutdown
();
HW
::
Shutdown
();
Memory
::
Shutdown
();
CoreTiming
::
Shutdown
();
CoreTiming
::
Shutdown
();
Core
::
Shutdown
();
Core
::
Shutdown
();
}
}
...
...
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