Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
0b39d1a8
Commit
0b39d1a8
authored
18 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
libwine: Added a function to enumerate the reserved mmap areas.
parent
c0596e0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/wine/library.h
+2
-0
2 additions, 0 deletions
include/wine/library.h
libs/wine/mmap.c
+35
-0
35 additions, 0 deletions
libs/wine/mmap.c
libs/wine/wine.def
+1
-0
1 addition, 0 deletions
libs/wine/wine.def
libs/wine/wine.map
+1
-0
1 addition, 0 deletions
libs/wine/wine.map
with
39 additions
and
0 deletions
include/wine/library.h
+
2
−
0
View file @
0b39d1a8
...
...
@@ -75,6 +75,8 @@ extern void *wine_anon_mmap( void *start, size_t size, int prot, int flags );
extern
void
wine_mmap_add_reserved_area
(
void
*
addr
,
size_t
size
);
extern
void
wine_mmap_remove_reserved_area
(
void
*
addr
,
size_t
size
,
int
unmap
);
extern
int
wine_mmap_is_in_reserved_area
(
void
*
addr
,
size_t
size
);
extern
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
);
/* LDT management */
...
...
This diff is collapsed.
Click to expand it.
libs/wine/mmap.c
+
35
−
0
View file @
0b39d1a8
...
...
@@ -539,3 +539,38 @@ int wine_mmap_is_in_reserved_area( void *addr, size_t size )
}
return
0
;
}
/***********************************************************************
* wine_mmap_enum_reserved_areas
*
* Enumerate the list of reserved areas, sorted by addresses.
* If enum_func returns a non-zero value, enumeration is stopped and the value is returned.
*
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
)
{
int
ret
=
0
;
struct
list
*
ptr
;
if
(
top_down
)
{
for
(
ptr
=
reserved_areas
.
prev
;
ptr
!=
&
reserved_areas
;
ptr
=
ptr
->
prev
)
{
struct
reserved_area
*
area
=
LIST_ENTRY
(
ptr
,
struct
reserved_area
,
entry
);
if
((
ret
=
enum_func
(
area
->
base
,
area
->
size
,
arg
)))
break
;
}
}
else
{
for
(
ptr
=
reserved_areas
.
next
;
ptr
!=
&
reserved_areas
;
ptr
=
ptr
->
next
)
{
struct
reserved_area
*
area
=
LIST_ENTRY
(
ptr
,
struct
reserved_area
,
entry
);
if
((
ret
=
enum_func
(
area
->
base
,
area
->
size
,
arg
)))
break
;
}
}
return
ret
;
}
This diff is collapsed.
Click to expand it.
libs/wine/wine.def
+
1
−
0
View file @
0b39d1a8
...
...
@@ -103,6 +103,7 @@ EXPORTS
wine_ldt_realloc_entries
wine_ldt_set_entry
wine_mmap_add_reserved_area
wine_mmap_enum_reserved_areas
wine_mmap_is_in_reserved_area
wine_mmap_remove_reserved_area
wine_pthread_get_functions
...
...
This diff is collapsed.
Click to expand it.
libs/wine/wine.map
+
1
−
0
View file @
0b39d1a8
...
...
@@ -103,6 +103,7 @@ WINE_1.0
wine_ldt_realloc_entries;
wine_ldt_set_entry;
wine_mmap_add_reserved_area;
wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area;
wine_pthread_get_functions;
...
...
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