Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
44637897
Commit
44637897
authored
Apr 18, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
printing memory usage
parent
f99b3c6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
loop.c
loop.c
+9
-2
No files found.
loop.c
View file @
44637897
#include <stdio.h>
#include "sass_interface.h"
#include <sys/resource.h>
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -8,13 +9,18 @@ int main(int argc, char** argv)
return
0
;
}
int
who
=
RUSAGE_SELF
;
struct
rusage
r
;
while
(
1
)
{
getrusage
(
who
,
&
r
);
printf
(
"Memory usage: %ld"
,
r
.
ru_maxrss
);
struct
sass_file_context
*
ctx
=
sass_new_file_context
();
ctx
->
options
.
include_paths
=
"::/blah/bloo/fuzz:/slub/flub/chub::/Users/Aaron/dev/libsass/::::/huzz/buzz:::"
;
ctx
->
options
.
output_style
=
SASS_STYLE_NESTED
;
ctx
->
input_path
=
argv
[
1
];
sass_
compile_f
ile
(
ctx
);
sass_
file_comp
ile
(
ctx
);
if
(
ctx
->
error_status
)
{
if
(
ctx
->
error_message
)
printf
(
"%s"
,
ctx
->
error_message
);
...
...
@@ -29,7 +35,7 @@ int main(int argc, char** argv)
break
;
}
sass_f
ree_fil
e_context
(
ctx
);
sass_f
ile_fre
e_context
(
ctx
);
}
return
0
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment