Rev 1509 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1509 | Rev 1653 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- | 27 | */ |
|
- | 28 | ||
- | 29 | /** @addtogroup libc |
|
- | 30 | * @{ |
|
- | 31 | */ |
|
- | 32 | /** @file |
|
27 | */ |
33 | */ |
28 | 34 | ||
29 | #include <as.h> |
35 | #include <as.h> |
30 | #include <libc.h> |
36 | #include <libc.h> |
31 | #include <unistd.h> |
37 | #include <unistd.h> |
Line 76... | Line 82... | ||
76 | /* Start of heap linker symbol */ |
82 | /* Start of heap linker symbol */ |
77 | extern char _heap; |
83 | extern char _heap; |
78 | 84 | ||
79 | /** Sbrk emulation |
85 | /** Sbrk emulation |
80 | * |
86 | * |
81 | * @param size New area that should be allocated or negative, |
87 | * @param incr New area that should be allocated or negative, |
82 | if it should be shrinked |
88 | if it should be shrinked |
83 | * @return Pointer to newly allocated area |
89 | * @return Pointer to newly allocated area |
84 | */ |
90 | */ |
85 | void *sbrk(ssize_t incr) |
91 | void *sbrk(ssize_t incr) |
86 | { |
92 | { |
Line 138... | Line 144... | ||
138 | res = last_allocated; |
144 | res = last_allocated; |
139 | last_allocated += sz; |
145 | last_allocated += sz; |
140 | 146 | ||
141 | return res; |
147 | return res; |
142 | } |
148 | } |
- | 149 | ||
- | 150 | ||
- | 151 | /** @} |
|
- | 152 | */ |
|
- | 153 | ||
- | 154 |