Return-Path: X-Original-To: apmail-incubator-directmemory-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-directmemory-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 457F69185 for ; Fri, 24 Feb 2012 09:07:33 +0000 (UTC) Received: (qmail 76958 invoked by uid 500); 24 Feb 2012 09:07:33 -0000 Delivered-To: apmail-incubator-directmemory-dev-archive@incubator.apache.org Received: (qmail 76925 invoked by uid 500); 24 Feb 2012 09:07:33 -0000 Mailing-List: contact directmemory-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directmemory-dev@incubator.apache.org Delivered-To: mailing list directmemory-dev@incubator.apache.org Received: (qmail 76912 invoked by uid 99); 24 Feb 2012 09:07:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 09:07:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 09:07:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AD54F33858E for ; Fri, 24 Feb 2012 09:06:49 +0000 (UTC) Date: Fri, 24 Feb 2012 09:06:49 +0000 (UTC) From: "Olivier Lamy (Updated) (JIRA)" To: directmemory-dev@incubator.apache.org Message-ID: <1686759951.14580.1330074409711.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1892555211.31300.1322757400151.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DIRECTMEMORY-37) Update the MemoryManager API so it can be used in conjunction with NIO to provide efficient buffer management MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRECTMEMORY-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy updated DIRECTMEMORY-37: ------------------------------------- Fix Version/s: 0.6.0 > Update the MemoryManager API so it can be used in conjunction with NIO to provide efficient buffer management > ------------------------------------------------------------------------------------------------------------- > > Key: DIRECTMEMORY-37 > URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-37 > Project: Apache DirectMemory > Issue Type: New Feature > Reporter: Hiram Chirino > Fix For: 0.6.0 > > > If MemoryManager implemented something like a ByteBuffer allocate(int size) then I could be used to directly transfer data to/from Files and Sockets without having to first copy them to a byte[]. > I'm not talking about using the ByteBuffer.allocate call. I'm talking about adding a method to MemoryManager: > ByteBuffer bb = MemoryManager.allocate(1024*1024); > So that I can directly modify the ByteBuffer using Channels to avoid a memory copy.. Compare this to using the MemoryManager store, update, and retrieve calls. They all force you to work with byte[]s so you end up doing a memory copies into and out of direct memory. > This was originally reported at: https://github.com/raffaeleguidi/DirectMemory/issues/49#issuecomment-2661141 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira